Initialize Addional Master nodes
There is a slight discrepancy between initializing the first master node and additional master nodes
Dependency
Completed the guidance of Kubeadm Setup
Completed the guidance of Initialize First Master Node
The following procedures required root permission. Please switch to root account or execute command with sudo
Enable kubectl auto-completion for bash
Ensure that the kubectl completion script gets sourced in all your shell sessions
kubectl completion bash | sudo tee /etc/bash_completion.d/kubectl > /dev/null
sudo chmod a+r /etc/bash_completion.d/kubectlExtend shell completion to work with alias-k
echo 'alias k=kubectl' >> /etc/bash_completion.d/kubectl
echo 'complete -o default -F __start_kubectl k' >> /etc/bash_completion.d/kubectlClone the kube-vip configuration file
Create kube-vip manifest yaml
Clone the kube-vip.yaml from first master node
Join Kubernetes cluster as a control plane
Append master nodes and vip host into hosts file
Run the join command that shown on first Master node

Source out KUBECONFIG for root user
Create regular user
Create user for k8suser
Set password for k8suser
Grant sudo privileges
Insert above line into the file
Add user k8suser to the docker group
Check which groups a user belongs to
Switch to user k8suser to manage Kubernetes cluster
Last updated
Was this helpful?