Worker Setup Steps for CKA Kubernetes Cluster
This step outlines the steps required to successfully join worker nodes to a Kubernetes cluster, ensuring they are configured correctly for operation.
Categories:
Prerequisites
- Common Setup Steps for CKA K8s Cluster: This page outlines the essential setup steps for both master and worker nodes in a Kubernetes cluster. disable swap, load the required kernel modules, set the necessary system parameters, and install CRI-O runtime, Kubeadm, and related tools.
Kube config
First, create the required Kube configuration directory and copy the kubeconfig file:
mkdir -p $HOME/.kube
cp -i /vagrant/tmp/kubeconfig $HOME/.kube/config
Join cluster
On each worker node, run the join script to connect your worker node to the cluster:
sudo /bin/bash /vagrant/tmp/join.sh -v
Finally, label the node as a worker:
NODENAME=$(hostname -s)
kubectl label node $NODENAME node-role.kubernetes.io/worker=worker
You can verify the setup by checking the status of the nodes:
vagrant@c2d-cka-worker1:~$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
c2d-cka-cp Ready control-plane 61m v1.28.15
c2d-cka-worker1 Ready worker 37s v1.28.15
vagrant@c2d-cka-worker1:~$
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
Last modified April 3, 2025: cka content C2-780 C2-781 (b5f908b)