Setting Up the CKA Cluster with Ansible
This page outlines the steps to set up the CKA cluster using Ansible, including the creation of the control plane (master node) and three worker nodes. The entire process takes approximately 15 minutes with the C2 Platform.
Categories:
Projects: c2platform/ansible
Prerequisites
- Setup a Development Environment on Ubuntu 22: Install Ansible, Vagrant, LXD, Virtualbox and clone the project directories.
Setup Control Plane
To set up the control node, run the command below. This process takes around 4 minutes to complete:
vagrant up c2d-cka-cp
Wait until the node status changes to “Ready”:
kubectl get nodes -w
Show me
98° [:ansible-dev]└2 master(+175/-122)* ± kubectl get nodes -w
NAME STATUS ROLES AGE VERSION
c2d-cka-cp NotReady control-plane 23s v1.28.15
c2d-cka-cp Ready control-plane 24s v1.28.15
Setup Worker Nodes
Next, set up the worker nodes. This process will take approximately 11 minutes:
vagrant up c2d-cka-worker{1..3} --no-provision
Then, observe their progress as they join the cluster:
kubectl get nodes -w
Show me
[ostraaten@io3 ckad-study-guide (⎈|kubernetes-admin@kubernetes:N/A)]$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
c2d-cka-cp Ready control-plane 25m v1.28.15
c2d-cka-worker1 Ready worker 11m v1.28.15
c2d-cka-worker2 Ready worker 8m14s v1.28.15
c2d-cka-worker3 Ready worker 4m34s v1.28.15
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)