web123456

k8s deployment Multi-master node load balancing and cluster high availability

I. k8s add multi-master node experiment

1. master02 node initialization operation

2. On the basis of master01 node, complete the master02 node deployment

① fromThe master01 node copies the required files

Needed to replicate the etcd database from the master01 node Requiredssl certificatekubernetesInstallation directory (binaries, cluster boot files for components to communicate with apiserver, startup parameter configuration files), cluster boot files for kubectl to communicate with apiserver, and service files for each component to be managed by systemd.

② Modify the listening addresses in the apiserver, controller-manager, and scheduler startup parameter configuration files, as well as the notification address of the apiserver.

(iii) Verification

II. UsenginxDeploying k8s cluster master node load balancing

Three,Deploying keepalived service for k8s cluster load balancer high availability

The standby node modifies the master node's configuration file on the

Verifying Failover

Restarting nginx and keepalived services on the master node will hijack the vip.

IV. ModificationsnodeThe ip corresponding to the server in the configuration bootstrap file on the node is VIP

Modify all node nodes on the, profile to VIP

V. All master node cluster boot configuration files point to the local apiserver ip and port