Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
themeMidnight
$ sudo# kubeadm init --pod-network-cidr=20.20.0.0/16

...

Code Block
languagebash
themeMidnight
$# mkdir -p $HOME/.kube
$ sudo# cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
$ sudo# chown $(id -u):$(id -g) $HOME/.kube/config

...

Code Block
languagebash
themeMidnight
$# kubectl get nodes
NAME          STATUS     ROLES    AGE     VERSION
k8s-master    NotReady   master   4m45s   v1.14.2

...

Code Block
languagebash
themeMidnight
$# sudo kubeadm join 10.1.1.29:6443 --token 7wjotj.50lcr77dds50gh8q \
    --discovery-token-ca-cert-hash sha256:d11c1256b16d8130596ca121a14b5900d11bc5bcc64a817db9190be00f70b161

...

Code Block
languagebash
themeMidnight
$# kubectl get nodes
NAME          STATUS     ROLES    AGE     VERSION
k8s-master    NotReady   master   4m45s   v1.14.2
k8s-worker1   NotReady   <none>   49s     v1.14.2
k8s-worker2   NotReady   <none>   46s     v1.14.2

...

The status of the nodes will be shown as NotReady, because none of CNIs were installed yet.


Copy CA file from master node to worker node.

Code Block
languagebash
themeMidnight
# mkdir -p $HOME/.kube
# scp root@master:/etc/kubernetes/admin.conf $HOME/.kube/config
# chown $(id -u):$(id -g) $HOME/.kube/config


After all nodes are joint to Kubernetes cluster, users need to manually remove kube-proxy daemonset. The current version of kubeadm does not allow to skip kube-proxy installation.

...