Kubernetes : Kubeadm : Configure Worker Node2019/08/26 |
Install Kubeadm to Configure Multi Nodes Kubernetes Cluster.
On this example, Configure This example is based on the emvironment like follows.
For System requirements, each Node has uniq Hostname, MAC address, Product_uuid.
MAC address and Product_uuid are generally already uniq one if you installed OS on phisical machine or virtual machine with common procedure. You can see Product_uuid with the command [dmidecode -s system-uuid]. -----------+---------------------------+--------------------------+------------ | | | eth0|10.0.0.30 eth0|10.0.0.51 eth0|10.0.0.52 +----------+-----------+ +-----------+----------+ +-----------+----------+ | [ dlp.srv.world ] | | [ node01.srv.world ] | | [ node02.srv.world ] | | Master Node | | Worker Node | | Worker Node | +----------------------+ +----------------------+ +----------------------+ |
Configure Worker Node on this section.
|
|
[1] | |
[2] | Join in Kubernetes Cluster which is initialized on Master Node. The command for joining is just the one [kubeadm join ***] which was shown on the bottom of the results on initial setup of Cluster. |
# load modules root@node01:~# modprobe ip_vs root@node01:~# modprobe ip_vs_rr root@node01:~# modprobe ip_vs_wrr root@node01:~# modprobe ip_vs_sh
root@node01:~#
vi /etc/modules # add to the end
ip_vs
ip_vs_rr ip_vs_wrr ip_vs_sh kubeadm join 10.0.0.30:6443 --token uw8h1x.4vjex3g6tfgt4w2t \ --discovery-token-ca-cert-hash sha256:99c192dcb2b38438c4aacc5029b86447f18f2b93a0fe0fa7a779192bc952fb53 [preflight] Running pre-flight checks [preflight] Reading configuration from the cluster... [preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml' [kubelet-start] Downloading configuration for the kubelet from the "kubelet-config-1.15" ConfigMap in the kube-system namespace [kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml" [kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env" [kubelet-start] Activating the kubelet service [kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap... This node has joined the cluster: * Certificate signing request was sent to apiserver and a response was received. * The Kubelet was informed of the new secure connection details. Run 'kubectl get nodes' on the control-plane to see this node join the cluster. # OK if [This node has joined the cluster] |
[3] | Verify Status on Master Node. It's Ok if all STATUS are Ready. |
root@dlp:~# kubectl get nodes NAME STATUS ROLES AGE VERSION dlp.srv.world Ready master 25m v1.15.3 node01.srv.world Ready <none> 6m32s v1.15.3 node02.srv.world Ready <none> 34s v1.15.3 |
Sponsored Link |