Fedora 43
Sponsored Link

Kubernetes : वर्कर नोड कॉन्फ़िगर करें2025/11/21

 

मल्टी नोड्स Kubernetes क्लस्टर को कॉन्फ़िगर करने के लिए Kubeadm स्थापित करें।

यह उदाहरण निम्न प्रकार से पर्यावरण पर आधारित है।

-----------+---------------------------+--------------------------+------------
           |                           |                          |
       eth0|10.0.0.30              eth0|10.0.0.51             eth0|10.0.0.52
+----------+-----------+   +-----------+----------+   +-----------+----------+
|   [ dlp.srv.world ]  |   | [ node01.srv.world ] |   | [ node02.srv.world ] |
|     Control Plane    |   |      Worker Node     |   |      Worker Node     |
+----------------------+   +----------------------+   +----------------------+

[1]

सभी नोड्स पर पूर्व-आवश्यकताओं को कॉन्फ़िगर करें, यहां देखें।

[2] Kubernetes क्लस्टर में शामिल हों जिसे कंट्रोल प्लेन नोड पर प्रारंभ किया गया है।
शामिल होने का आदेश केवल एक है [kubeadm join ***] जो क्लस्टर के प्रारंभिक सेटअप पर परिणामों के नीचे दिखाया गया था।
[root@node01 ~]#
kubeadm join 10.0.0.30:6443 --token abcdef.0123456789abcdef \
--discovery-token-ca-cert-hash sha256:a0eb7372844a5bf0d31ea23cc30dc27c81fb1e3ce772c49107abbf3a81ecb421

[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.
[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 1.001977065s
[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.

# ठीक है अगर [यह नोड क्लस्टर में शामिल हो गया है]

[3] नियंत्रण विमान नोड पर स्थिति सत्यापित करें। यदि सभी स्टेटस तैयार हैं तो यह ठीक है।
[root@dlp ~]#
kubectl get nodes

NAME               STATUS   ROLES           AGE     VERSION
dlp.srv.world      Ready    control-plane   8m50s   v1.34.2
node01.srv.world   Ready    <none>          2m46s   v1.34.2
node02.srv.world   Ready    <none>          12s     v1.34.2
मिलान सामग्री