Skip to content

Smoke test the cluster

If all has gone well, a cluster will now be running on your local system comprising of 3 nodes and a workstation.

We can check status by now switching directory to the vagrant dev folder and running a vagrant status command :

Terminal window
cd vagrant/dev/ubuntu/
vagrant status
Current machine states:
vm1 running (virtualbox)
vm2 running (virtualbox)
vm3 running (virtualbox)
workstation running (virtualbox)
This environment represents multiple VMs. The VMs are all listed
above with their current state. For more information about a specific
VM, run `vagrant status NAME`.

To work on our cluster we must first connect to the workstation and then use kubectl commands to interact with k3s :

Terminal window
vagrant ssh workstation

From the workstation, use kubectl to access our cluster

Terminal window
kubectl get nodes
NAME STATUS ROLES AGE VERSION
vm1 Ready control-plane,etcd,master 4h11m v1.33.3+k3s1
vm2 Ready control-plane,etcd,master 4h11m v1.33.3+k3s1
vm3 Ready control-plane,etcd,master 4h10m v1.33.3+k3s1

If you have got this far, congratulation you have a locally hosted k3s cluster running in 3 virtual machines and a workstation that can be used to manage it using kubectl and ansible.