mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
Alternatively, if you are the root user, you can run:
export KUBECONFIG=/etc/kubernetes/admin.conf
You should now deploy a pod network to the cluster.
Run “kubectl apply -f [podnetwork].yaml” with one of the options listed at:
https://kubernetes.io/docs/concepts/cluster-administration/addons/
You can now join any number of control-plane nodes by copying certificate authorities
and service account keys on each node and then running the following as root:
kubeadm join 192.168.177.6:16443 –token abcdef.0123456789abcdef
–discovery-token-ca-cert-hash sha256:1a3360a40a0305ecdd950215c93b447273d17369c9d95c692f38f1349f42c388
–control-plane
shell Then you can join any number of worker nodes by running the following on each as root:
kubeadm join 192.168.177.6:16443 –token abcdef.0123456789abcdef
–discovery-token-ca-cert-hash sha256:1a3360a40a0305ecdd950215c93b447273d17369c9d95c692f38f1349f42c388