Kubernetes : Worker नोड्स जोड़ें2024/06/07 |
|
मौजूदा Kubernetes क्लस्टर में नए Worker नोड्स जोड़ें।
यह उदाहरण क्लस्टर वातावरण पर आधारित है, जो इस प्रकार है।
+----------------------+ +----------------------+
| [ 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, क्लस्टर में शामिल होने के लिए सामान्य सेटिंग्स कॉन्फ़िगर करें, यहां देखें। |
| [2] | कंट्रोल प्लेन नोड पर जॉइन कमांड की पुष्टि करें। |
|
root@dlp:~# kubeadm token create --print-join-command kubeadm join 10.0.0.25:6443 --token pqsfr3.5zt0ffe08xi1iz4x --discovery-token-ca-cert-hash sha256:9cb21e3807780e1acf9ad9b6369ce54b1141ecf007d099675b23b6c3368494c9 |
| [3] | नये नोड पर join कमांड चलाएँ। |
|
root@node03:~# kubeadm join 10.0.0.25:6443 --token pqsfr3.5zt0ffe08xi1iz4x \ --discovery-token-ca-cert-hash sha256:9cb21e3807780e1acf9ad9b6369ce54b1141ecf007d099675b23b6c3368494c9 [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 -o yaml' [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. This can take up to 4m0s [kubelet-check] The kubelet is healthy after 503.162529ms [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] | प्रबंधक नोड पर सेटिंग्स सत्यापित करें। यदि नए नोड की स्थिति [स्थिति = तैयार] हो जाती है तो यह ठीक है। |
|
root@ctrl:~# kubectl get nodes NAME STATUS ROLES AGE VERSION dlp.srv.world Ready control-plane 3h33m v1.30.1 node01.srv.world Ready <none> 3h28m v1.30.1 node02.srv.world Ready <none> 3h27m v1.30.1 node03.srv.world Ready <none> 56s v1.30.1root@ctrl:~# kubectl get pods -A -o wide | grep node03 kube-system calico-node-gl4k8 1/1 Running 0 86s 10.0.0.53 node03.srv.world <none> <none> kube-system kube-proxy-8c2hq 1/1 Running 0 86s 10.0.0.53 node03.srv.world <none> <none> |
| Sponsored Link |
|
|