Kubernetes : Add Worker Nodes2026/05/13 |
|
Add new Worker Nodes to existing Kubernetes Cluster.
This example is based on the cluster environment like follows.
+----------------------+ +----------------------+
| [ ctrl.srv.world ] | | [ dlp.srv.world ] |
| Manager Node | | Control Plane |
+-----------+----------+ +-----------+----------+
eth0|10.0.0.25 eth0|10.0.0.30
| |
------------+--------------------------+-----------
| |
eth0|10.0.0.51 eth0|10.0.0.52
+-----------+----------+ +-----------+----------+
| [ node01.srv.world ] | | [ node02.srv.world ] |
| Worker Node#1 | | Worker Node#2 |
+----------------------+ +----------------------+
|
| [1] |
On a new Node, Configure common settings to join in Cluster, refer to here. |
| [2] | Confirm join command on Control Plane Node. |
|
root@dlp:~# kubeadm token create --print-join-command kubeadm join 10.0.0.25:6443 --token 69ih26.wpyfgw7htrgk2n14 --discovery-token-ca-cert-hash sha256:89e79c33d19a21e2a6f7ed22dd1dc0f9ef3660efaeefed636f33e8559f2b26ac |
| [3] | Run join command on a new Node. |
|
root@node03:~# kubeadm join 10.0.0.25:6443 --token 69ih26.wpyfgw7htrgk2n14 \ --discovery-token-ca-cert-hash sha256:89e79c33d19a21e2a6f7ed22dd1dc0f9ef3660efaeefed636f33e8559f2b26ac [preflight] Running pre-flight checks [preflight] Reading configuration from the "kubeadm-config" ConfigMap in namespace "kube-system"... [preflight] Use 'kubeadm init phase upload-config kubeadm --config your-config-file' to re-upload it. W0513 01:13:24.949594 2776 utils.go:69] The recommended value for "bindAddress" in "KubeProxyConfiguration" is: ::; the provided value is: 0.0.0.0 [kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/instance-config.yaml" [patches] Applied patch of type "application/strategic-merge-patch+json" to target "kubeletconfiguration" [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] Starting the kubelet [kubelet-check] Waiting for a healthy kubelet at http://127.0.0.1:10248/healthz. This can take up to 4m0s [kubelet-check] The kubelet is healthy after 501.811535ms [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. |
| [4] | Verify settings on Manager Node. That's OK if the status of new Node turns to [STATUS = Ready]. |
|
root@ctrl:~# kubectl get nodes NAME STATUS ROLES AGE VERSION dlp-1.srv.world Ready control-plane 8m55s v1.36.0 dlp.srv.world Ready control-plane 21h v1.36.0 node01.srv.world Ready <none> 20h v1.36.0 node02.srv.world Ready <none> 20h v1.36.0 node03.srv.world Ready <none> 35s v1.36.0root@ctrl:~# kubectl get pods -A -o wide | grep node03 calico-system calico-node-5qkns 1/1 Running 0 91s 10.0.0.53 node03.srv.world <none> <none> calico-system calico-typha-5ccddc7d97-mh4t9 1/1 Running 0 91s 10.0.0.53 node03.srv.world <none> <none> calico-system csi-node-driver-r4ksr 2/2 Running 0 91s 192.168.127.65 node03.srv.world <none> <none> kube-system kube-proxy-svzmk 1/1 Running 0 91s 10.0.0.53 node03.srv.world <none> <none> |
| Sponsored Link |
|
|