This exam measures whether you can, on your own, harden a kubeadm cluster without breaking the application it hosts: close the API server's profiler, trace Secret reads, have the cluster refuse what breaks a rule, confine workloads, require mutual TLS, close the network, detect a network tool and admit only a signed and scanned image. It is meant for people who are finishing level 5, "Secure the cluster". It runs in a virtual machine, so plan about 150 minutes. You pass it by meeting the seven critical criteria and reaching at least 70 points out of 100. It offers four hints, which cost between 10 and 25 points each, and it teaches nothing new: it checks what the lessons have taught.
What you will learn
- Say what the exam expects, and on which state of the node and the cluster it grades you.
- Spot the level lessons to review before you start.
- Work out what you must pass: the seven critical criteria, then enough others to reach 70 points.
- Know what a hint costs, and how to take one, to decide whether to ask for one.
What should you be able to do before you start?
No step-by-step guide goes with the exam, and choosing the right objects is part of what it measures. The specification names no Kubernetes object: it describes results. What it asks is taught in level 5, "Secure the cluster", and, for closing the network, in the Networking and exposure module of level 2. It also assumes the kubeadm cluster of level 4 and the basic resources of levels 1 to 3. If a step feels unclear, reread the lesson concerned before you start.
One criterion weighs on the whole exam: the shop must still answer at the end, with its replicas created under the rules you have set. The section "What should you do after the exam?" lists the lessons tied to each criterion.
What does the specification ask for?
The scenario has you take over the kubeadm cluster that hosts a shop. It works, and that is all anyone has ever asked of it. It says what must be true at the end, never how to get there. The lab scenario gives the names that the grader looks for: it is authoritative, so read it in full when you start.
You work on the node k8s-cp.lab, with kubectl and root rights through sudo. Falco runs there and writes its alerts as JSON to /var/log/falco/events.json. The runsc sandbox runtime is known to containerd. The AppArmor and seccomp profiles you write live there, and only there. The tools trivy, cosign and crane are installed, and a local registry answers on localhost:5000: it holds boutique/catalogue:1.21, a copy of the original image, and boutique/outil:1.0, another image, both unsigned. The cluster itself pulls the shop's images from Docker Hub. The catalogue's Dockerfile is in /root/boutique, and your signing keys never leave it.
The inherited state is spread between the control plane and five namespaces, including partenaires, which hosts the client without a sidecar.
- The
boutiquenamespace accepts any Pod and any image. ItscatalogueDeployment (two replicas, reachable at the stable namecatalogue-svc) runs onnginxinc/nginx-unprivileged:1.21, an image named by a tag, unsigned and riddled with flaws. Next to it, the Podoutil-ancienwas started with every privilege. - In the invoicing namespace,
facturation, workloads share the machine's kernel freely. Its Podexport-comptablesends the entries to the accounting firm through a channel that is already open, and nobody would notice a download tool starting in it. - In the
commandesnamespace, an Istio mesh accepts plaintext traffic: from thepartenairesnamespace,transporteur, without a sidecar, reads what the order tracking servicesuiviserves to the cartpanier. - In the
paiementnamespace,caisseis the legitimate client of the ledgergrand-livre, the payments database (HTTP, port 80), and everyone else, the advertising trackerpubliciteincluded, reaches everything, outside the namespace too. - On the control plane, the API server exposes its profiler, a CIS audit fails on several points, and nothing traces who reads what.
The specification comes down to nineteen requirements, each graded by one criterion.
- The API server's profiler no longer answers, and the API still answers.
- A new CIS audit of the control plane counts fewer failures than at the start, and its profiling checks pass on every component they target.
- The API server runs with auditing on, its policy and its log living on the node.
- Reads of the cluster's Secrets are recorded in full, and everything else as metadata only.
- In the
boutiquenamespace and only there, a Pod that breaks the restricted security standard is refused, and a compliant Pod is accepted. - In
boutiqueas well, a Pod whose image is named by a tag is refused by the cluster itself, and one whose image is pinned by its digest is accepted. The other namespaces are untouched. outil-ancienno longer exists. A Pod namedoutildoes the same job (it sleeps), without any of its flaws, and no longer sees the host's processes.- In
facturation, with the imagebusybox:1.37onk8s-cp.lab, a Podconsultation, which displays the invoices, can read its file system but cannot put anything in/dev/shm, the refusal coming from an AppArmor profile loaded in enforce mode. - In
facturation, a Podnumerotation, which assigns invoice numbers, runs under a local seccomp profile that refuses thechownfamily and allows everything else. - The
commandesnamespace requires mutual TLS:transporteurno longer reachessuivi,panierstill does. - The
paiementnamespace denies inbound and outbound traffic by default for all its Pods. Onlycaissereachesgrand-livre, on port 80, and names still resolve. - In
facturation, a Podrendu, which builds the invoices from received documents, runs in the sandbox runtime and reads a kernel different from the machine's. - A network or download tool (
wget,curl,ncand the like) started in a container offacturationraises an alert from a Falco rule namedoutil-reseau-en-facturation, with priorityWARNING, and the same tool started in another namespace raises none. - The rules shipped with Falco remain intact.
- The catalogue references its image by the digest that the node actually runs, an image of
nginxinc/nginx-unprivilegedother than the original. - Its copy in the local registry,
localhost:5000/boutique/catalogue, is signed. The public key is published in theboutiquenamespace, and verification with it accepts this image and refusesboutique/outil:1.0. - This production image carries strictly fewer critical vulnerabilities than the original.
- The findings of the static analysis of the Dockerfile are gone, and it still builds an nginx image that serves the shop's pages.
- The shop still answers at
catalogue-svc, with all its replicas available, created under the hardenings above.
How do you start the exam and get graded?
The lab prepares the cluster and the full statement, then reads the state of the node and of the cluster again when you ask for your grade. You start it with dsoxlab run k8s-epreuve-securiser-un-cluster. Three commands are then used: dsoxlab hint k8s-epreuve-securiser-un-cluster gives the next hint, which is paid and reduces your scale, dsoxlab check k8s-epreuve-securiser-un-cluster tells you where you stand as many times as you like, and dsoxlab submit k8s-epreuve-securiser-un-cluster returns the verdict. The grade never looks at the commands you typed, only at the final state.
The grader reads the node and the cluster, never your manifests. It replays the CIS audit, reads the audit log after two real requests, submits Pods to admission, writes and runs chown in the Pods, makes real connections, compares kernels, runs wget itself, verifies the signatures with your published key, rescans the images and queries the shop.
Put it into practice
This lab is the exam itself. It puts you in front of the scenario described above and it is validated on the final state of the node and of the cluster, as a colleague taking over your work would.
How is the exam graded?
Nineteen criteria make up the grade, at equal weight: each is worth about 5.3 points out of 100. The pass mark is 70 points. Seven criteria are critical: they must all pass, and failing a single one fails the exam, whatever the total. The seven critical criteria are worth about 36.8 points: with no hint, you must therefore pass all of them, then at least seven of the other twelve to reach 70, that is fourteen criteria in all.
There are four hints, and each covers a different part of the exam. They cost 10, 15, 20 and 25 points. They are given in order: dsoxlab hint always gives the first hint you have not yet taken, and you cannot choose the one that would help you. The cost is taken off the scale before the grade is computed: the grade is the share of criteria passed, applied to that reduced scale.
A hint taken makes the pass mark harder to reach: with the first one, at 10 points, the scale drops to 90 and you need fifteen criteria instead of fourteen. With two hints taken (25 points), the scale drops to 75 and you need eighteen criteria out of nineteen. Taking all four removes 70 points, and the maximum falls to 30. As soon as the hints taken cost more than 30 points in total, 70 points can no longer be reached, even with all nineteen criteria. So take a hint to get unstuck, never as a shortcut.
The table gives each criterion, phrased as a result, and says whether it is critical.
| Criterion | Critical | |
|---|---|---|
| P01 | the API server's profiler no longer answers, and the API still answers | yes |
| P02 | a new CIS audit counts fewer failures than at the start, and the profiling checks pass | no |
| P03 | the API server runs with auditing on, following the requested policy, and writes its log on the node | no |
| P04 | the log records a Secret read in full and an ordinary read as metadata only | yes |
| P05 | the shop's namespace refuses a Pod that breaks the restricted standard and accepts a compliant Pod | yes |
| P06 | the cluster refuses a Pod whose image is named by a tag and accepts one whose image is pinned, without touching the other namespaces | yes |
| P07 | the inherited privileged Pod is replaced by a Pod without its flaws, the original no longer exists and the host's processes are no longer visible | no |
| P08 | the AppArmor profile is loaded in enforce mode, and the confined Pod can read but no longer write to /dev/shm | no |
| P09 | the seccomp profile refuses the chown family and allows the rest, and the Pod that declares it runs | no |
| P10 | the meshed namespace requires mutual TLS, a client without a sidecar is blocked and a mesh client gets through | yes |
| P11 | the namespace is closed by default both ways, only the planned flow reaches the database and DNS resolves | no |
| P12 | the requested Pod runs in the node's sandbox runtime and reads a different kernel from the machine's | no |
| P13 | a network tool started in the protected namespace raises an alert from the requested Falco rule, with its priority, and the same tool started elsewhere does not | yes |
| P14 | the Falco rules shipped with the package are intact, and the requested detection rule does raise an alert | no |
| P15 | the shop's deployment references its image by the digest that the node actually runs | no |
| P16 | the public key is published in the cluster, the image is signed, and verification accepts it and refuses another one | no |
| P17 | the production image carries strictly fewer critical vulnerabilities than the original image | no |
| P18 | the findings of the static analysis of the Dockerfile are gone and the application still does the same thing | no |
| P19 | the shop still answers after every hardening, with its replicas available | yes |
What should you do after the exam?
If the seven critical criteria pass and the total reaches 70, the level is validated. Otherwise, reread the lesson that teaches the failed criterion, then retake the exam:
- P01 and P02: the lesson on the CIS Kubernetes Benchmark;
- P03 and P04: the lesson on audit logs;
- P05 and P07: the lesson on the Pod Security Standards;
- P06: the lesson on native admission policies (in French), since the exam asks for a refusal by the cluster itself, with no rule engine to install;
- P08: the lesson on AppArmor (in French);
- P09: the lesson on seccomp (in French);
- P10: the lesson on mutual TLS between Pods;
- P11: the lesson on NetworkPolicies;
- P12: the lesson on sandbox runtimes;
- P13 and P14: the lesson on Falco;
- P15 and P18: the lesson on supply chain security;
- P16: the lesson on signing and verifying an image;
- P17: the lesson on image scanning;
- P19: the lessons on the Pod Security Standards and on supply chain security: this criterion checks that all the hardenings hold together.
Key points
- The exam is a measurement: it explains nothing again and grades the state of the node and of the cluster, not your manifests or your commands.
- The seven critical criteria decide the verdict: failing one fails the exam, and the total must also reach 70 points.
- The shop must answer at the end, with its replicas created under the hardenings: a locked-down cluster that no longer serves anything fails.
- A hint costs 10, 15, 20 or 25 points, and hints are given in order: you do not choose the one you receive. Beyond 30 points of hints in total, the pass mark is out of reach.
dsoxlab checktells you where you stand at will, and onlydsoxlab submitreturns the verdict.