Initialize Addional Master nodes

Dependency

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/kubectl

Extend 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/kubectl

Clone 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?