Configuration of the Kubernetes cluster with external ETCD for a lab environment (3)
In the previous article, the Control Plane node was initialized by connecting an external ETCD node. Next, let’s initialize the Worker Node. Generally, kubelet, container runtime, and kube-proxy are executed in Worker Node, so it can be configured very simply. Let’s configure the worker node briefly and configure the kubeflow-based MLOps environment, which is the final goal of the architecture below.
Create bootstrap tokens with join command
Extract the worker node join command using the kubeadm command on the Control Plane node.
$ kubeadm token create --print-join-command
Join workers to use join command
Join the worker nodes using the command printed above. Let’s run the same command on all nodes to join. If multiple NICs are configured on the worker node, the IP to be used as a representative can be specified with the apiserver-advertiese-address option.
$ kubeadm join 10.0.0.1:6443 \
--token wbehps.5vzwsr2qhdkyeqej \
--discovery-token-ca-cert-hash sha256:56bdf55e4d27d82cdedd9b0fe1aa9372b747ebd040d8eca4c650d15878538b37 \
--apiserver-advertise-address {{ worker_ip }}
List cluster’s nodes
If the worker node is connected normally, you can check the connected node with the command below.
$ kubectl get nodes
Node labeling
When worker nodes are configured, they are generally labeled to distinguish worker nodes. Set up node labeling with the command below.
$ kubectl label nodes k8sworker{1,2} node-role.kubernetes.io/worker=worker
Conclusion
We have seen how to configure a kubernetes cluster in three steps. In general, kubernetes configuration is very complicated, but if there are not many things to consider, it can be installed very simply as in this article. I hope this helps you understand the overall Kubernetes configuration. If you need a large-capacity cluster or kubernetes in an on-premise environment, we recommend installing using kube spray.
I hope it will be helpful to those who are looking for related content. And if you have saved a lot of time with this content, please donate a cup of coffee. (Please help me to write while eating ice americano at a local cafe.)
And I am looking for a job. If you are interested, please comment for me.