This challenge checks that you can, on your own, prepare a reset worker and join it to a kubeadm cluster, then build a cluster with three control planes whose API keeps answering when one of them stops. It is meant for people who have just followed the lesson Kubernetes High Availability: the Control Plane of the Install a cluster module. It runs in three dsoxlab virtual machines, on a kubeadm cluster with Kubernetes 1.37, and takes about 60 minutes. It gives no hints and teaches nothing new: it checks what the lessons of the module and their guided lab have already let you practice.
What you will learn
The lab reads the state of the nodes, of the kubelet, of containerd, of swap, of the Pods, of etcd and of the API of the ha cluster. It checks that you can:
- Join a reset worker to the kubeadm cluster so that it is Ready with a kubelet in version 1.37.
- Turn swap off durably and set the cgroup driver of containerd.
- Force a Pod onto this worker with the
nodeNamefield. - Build a kind cluster with three control planes behind the load balancer placed in front of their API servers.
- Check that etcd counts three healthy members.
- Check that the API answers through the load balancer when a control plane is stopped.
What should you be able to do before you start?
No step-by-step guide goes with the challenge, and choosing the right settings is part of what it checks. Everything it asks is taught in five lessons:
- Kubernetes High Availability: the Control Plane, whose guided lab
cka-control-plane-haute-disponibilitehas you build three control planes behind a load balancer and lose one of them, and which also teaches the kind example with three control planes. - Join a worker to a kubeadm cluster, which teaches how to prepare a worker, containerd cgroup driver included, and how to join it.
- Install a Kubernetes cluster with kubeadm, which teaches how to install a cluster.
- CNI, CSI and CRI: the extension interfaces of Kubernetes, which teaches the role of the container runtime.
- Deploy a Kubernetes cluster in production: which option to choose, which teaches the control plane nodes of a cluster.
If one of these points feels unclear, reread the lesson before you start.
What does the statement ask for?
Two jobs are waiting for you. On the kubeadm cluster, the worker k8s-w1.lab has been removed from the cluster and reset: it is no longer a node, and its preparation has been undone. The team wants it back in service, cleanly: a machine joined in a hurry falls over at its first reboot.
At the same time, the team wants to see a highly available control plane survive the loss of one of its members. Since it does not have three spare machines, it hands you the host k8s-kind.lab, where Docker and kind are installed. You build there a kind cluster named ha, with the node image of the catalogue:
kindest/node:v1.37.0@sha256:a1ed56cfb0e7b93589bdf97c8cd566405a265939e3620fc4f5de89adff580ae5You are on k8s-cp.lab, the control plane of the kubeadm cluster, with kubectl configured and sudo rights. ssh k8s-w1.lab and ssh k8s-kind.lab open a session on the two other machines, where you also have sudo.
The statement says what must be true at the end, never how to get there:
k8s-w1.labis a node of the kubeadm cluster, Ready, and its kubelet reports a 1.37 version. This requirement is blocking.- Swap is off on the worker, and nothing will turn it back on at the next boot.
- containerd runs on the worker with the systemd cgroup driver.
- A Pod named
temoin, in theinstallationnamespace, is forced ontok8s-w1.labby thenodeNamefield of its spec, and it runs. - The
hacluster has three control-plane nodes, all Ready, read through the address of the load balancer that stands in front of their API servers. - etcd there has three voting, healthy members.
- The API of
hastill answers, through the address of the load balancer, when one of its control planes is stopped. This requirement is blocking.
How do you start the challenge and get graded?
The lab prepares the machines and reads their state again when you ask for your grade. You start it with dsoxlab run k8s-challenge-installer-un-cluster. Two commands are then used: dsoxlab check k8s-challenge-installer-un-cluster tells you where you stand, criterion by criterion, as many times as you like, and dsoxlab submit k8s-challenge-installer-un-cluster returns the final result. The grade never looks at the commands you typed.
For requirement 7, the lab stops a control plane of ha itself by freezing its container, queries /readyz through the load balancer, then starts it again. Every check therefore acts on the ha cluster for a good minute.
Put it into practice
This lab is the challenge itself. It puts you in front of the situation described above and it is validated on the state of the machines, as a colleague taking over your work would do.
How is the challenge graded?
The pass mark is 70 out of 100. The seven requirements weigh the same. Requirements 1 and 7 are blocking: if one of the two is not met, the challenge fails, whatever the total. Passing the others does not make up for failing them.
The dsoxlab check output is limited to the list of unmet criteria, by their label, and the grade: no message says why. If a criterion resists, reread the lesson that teaches it, among those in the list at the start, then run dsoxlab check again.
Key points
- The challenge is a final exercise to do alone and without hints: it explains nothing and grades the state of the machines, not your commands.
- Requirements 1 and 7 are blocking: the worker joined to the cluster, and the API that survives the loss of a control plane.
- The lab stops a control plane of
haitself: do not do it in its place during the check. dsoxlab checkshows where you stand as often as you like;dsoxlab submitreturns the result.