This challenge checks that you can, on your own, protect an application, drain a worker, bring it back into service, upgrade a whole kubeadm cluster by one minor version, then carry into Git a change made live. It is meant for people who have just followed the lesson Upgrade a Kubernetes cluster without downtime of the Maintain and upgrade module. It runs in a dsoxlab virtual machine, on a kubeadm cluster that starts in 1.36.4, and takes about 60 minutes. It gives no hints and teaches nothing new: it checks what the lessons and their guided labs have already let you practice.
What you will learn
The lab reads the state of the cluster and the Git repository. It checks that you can:
- Protect an application with a PodDisruptionBudget that guarantees a minimum of available Pods.
- Drain a worker while keeping the network DaemonSet, then bring it back into service.
- Keep a record of the operation in a ConfigMap.
- Upgrade the whole cluster to 1.37.0, with no unschedulable node and with every copy of the application ready.
- Carry into the Git repository the value of a configuration changed live.
What should you be able to do before you start?
No step-by-step guide goes with the challenge, and choosing the right order is part of what it checks. The steps it asks for are taught in five lessons:
- Upgrade a Kubernetes cluster without downtime, which teaches the upgrade with kubeadm;
- Prepare a Kubernetes cluster maintenance, which teaches how to protect the application during a maintenance;
- Manage Kubernetes cluster nodes day to day, which teaches how to drain a node and bring it back into service;
- Maintenance and Changes on a Kubernetes Cluster, which presents the maintenance operations;
- Changing a live resource: kubectl edit, patch and replace, which teaches how to carry into Git a change made live.
If one of these points feels unclear, reread the lesson before you start.
What does the statement ask for?
The kubeadm cluster runs 1.36.4, one minor version behind. In the maintenance namespace, the catalogue application serves with four replicas, spread over the control plane and the worker. A diagnostic tool, the outil-diag Pod, lingers on the worker with no controller; the team will not miss it. The schedule for the night: the worker k8s-w1.lab goes down for hardware maintenance, then comes back; after that, the whole cluster goes up to 1.37.0; and at no time may catalogue drop below two available replicas.
In the middle of the night, the catalogue team also asks to raise MAX_CONNEXIONS in its configuration (the catalogue-config ConfigMap) from 50 to 200, right away. Its manifests live in the Git repository ~/maintenance, and that repository is what counts at the next deployment. You are on k8s-cp.lab, the control plane, with kubectl configured and sudo rights. ssh k8s-w1.lab opens a session on the worker, where you also have sudo.
The statement says what must be true at the end, never how to get there:
- A PodDisruptionBudget named
catalogue-pdbguarantees at least two availablecataloguePods, and really targets its Pods. - The worker has been drained: the
cataloguePods it carried were recreated elsewhere,outil-diagis gone, and the network DaemonSet stayed on it. This requirement is blocking. - The worker is back in service: it accepts Pods again.
- A
drain-evidenceConfigMap, inmaintenance, keeps a record of the operation: thedrained-nodekey names the drained node, thestatuskey iscompleted. - The API server reports version 1.37.0.
- Every node reports 1.37.0, none was left unschedulable, and
cataloguehas its four replicas ready. This requirement is blocking. - In the cluster,
MAX_CONNEXIONSis200, and the last commit of the~/maintenancerepository carries the same value.
How do you start the challenge and get graded?
The lab starts on a cluster in 1.36.4, then reads its state and the repository again when you ask for your grade. You start it with dsoxlab run k8s-challenge-maintenir-un-noeud. Two commands are then used: dsoxlab check k8s-challenge-maintenir-un-noeud lists the unmet criteria and gives the grade, and dsoxlab submit k8s-challenge-maintenir-un-noeud returns the final result. The grade never looks at the commands you typed: it reads the state of the cluster and the Git repository. For requirement 3, the lab starts a short-lived Pod, sonde-placement, that the scheduler must place on the worker, then removes it.
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 cluster, as a colleague taking over your work would do.
How is the challenge graded?
The pass mark is 70 points out of 100. The seven requirements weigh the same. Requirements 2 and 6 are blocking: if one of the two is not met, the challenge fails, whatever the total. The feedback only lists the unmet criteria, by their label, with the grade: no message says why.
If a criterion resists, reread the lesson that teaches it, then run dsoxlab check again. The lesson Upgrade a Kubernetes cluster without downtime covers the upgrade, and Manage Kubernetes cluster nodes day to day covers draining and bringing a node back into service.
Key points
- The challenge is a final exercise to do alone and without hints: it explains nothing and grades the state of the cluster, not your commands.
- Requirements 2 and 6 are blocking: the drained worker, and the whole cluster upgraded to 1.37.0 without losing the application.
cataloguemust never drop below two available replicas during the night.dsoxlab checklists the unmet criteria;dsoxlab submitreturns the result.