Associated preparation
CKS labs
Securing the cluster and what runs on it: hardening, admission, network policies, image supply chain and runtime detection. The CKA is its prerequisite.
Back to all 761 labsHow to run a lab
- 41 labs
- 25 hours of practice
- 41 on a virtual machine
DSOXLab runs these labs on your machines
DSOXLab is the command-line tool behind every lab on this page. It prepares the environment, hands you the mission and checks the result, so the score comes from the state you actually built.
- Prepare It sets up the lab environment: the virtual machines, and the cluster when the lab uses one.
dsoxlab start <lab> - Practise You read the mission, then solve it yourself on the system, connecting to the machines when the lab has some.
dsoxlab challenge - Check It runs the tests on the state you produced and computes the score. The tests read that state, not the commands you typed.
dsoxlab check <lab> - Progress Results are recorded on your machine. If you want them on your account on this site, sign in and push them, when the catalogue allows it.
dsoxlab login / dsoxlab push
Install it with uv or pipx. No administrator rights are needed. uv tool install dsoxlab # or: pipx install dsoxlab Start a lab Install DSOXLab The DSOXLab course Source code on GitHub
Levels 17 intermediate 24 advanced
Official exam objectives published by CNCF
These are not exam questions. They are hands-on exercises on the skills the exam measures, graded on the state of your machine.
Add this catalogue dsoxlab catalog add https://github.com/stephrobert/kubernetes-dsoxlab-training every lab played and scored by the author
Kinds of exercise
Guided labs
31
You learn a mechanism with the guide beside you, then the lab checks what you ended up with.
-
Give a person access through a CertificateSigningRequest
Give the user camille access to the cluster through the CertificateSigningRequest API: her key and request, the approval, the issued certificate, her kubeconfig, then read-only rights on one namespace, checked with her own identity.
Graded on the state of the system attested 14 Nov 2026
Command to start it
dsoxlab start k8s-donner-un-acces-par-csr -
Serve a site over HTTPS with its own certificate, not the controller's
The site already answers over HTTPS, which is exactly the trap: the Ingress controller serves its own default certificate to anyone who asks. Terminate TLS with a certificate that actually names the host.
Graded on the state of the system attested 17 Nov 2026
Command to start it
dsoxlab start cks-ingress-tls -
Deny everything, then reopen the strict minimum, DNS included
A namespace where everything talks to everything. Close it completely in both directions, then reopen exactly two things: the one flow the application needs, and name resolution, which a default-deny egress breaks in a way nothing warns you about.
Graded on the state of the system attested 13 Nov 2026
Command to start it
dsoxlab start cks-networkpolicy-default-deny -
Make a container immutable without bringing it down
A running Deployment can still be written to from the inside. Make its root filesystem read-only, drop every capability, forbid escalation, and keep the application serving: nginx needs a few writable paths, and finding them is the exercise.
Graded on the state of the system attested 26 Nov 2026
Command to start it
dsoxlab start cks-security-context-immutable -
Take cluster-admin away from a service account, without stopping its work
A ServiceAccount holds cluster-admin because it was quicker. Take that power back and give it exactly what its application needs, no more. The proof is not the manifest: it is what the API server answers when that account asks.
Graded on the state of the system attested 13 Nov 2026
Command to start it
dsoxlab start cks-rbac-least-privilege -
Issue certificates with cert-manager and an internal CA
With cert-manager, issue a self-signed certificate, build an internal certificate authority and sign a service certificate with it, then diagnose and repair a certificate that stays not ready.
Graded on the state of the system attested 13 Nov 2026
Command to start it
dsoxlab start k8s-emettre-un-certificat-avec-cert-manager -
Find and remove what an attacker left behind
In a namespace where a scheduled workload quietly recreates an attacker's access, list what is scheduled, who holds which rights and what changed recently, record the culprit, remove it without touching the legitimate application, and prove the access does not come back.
Graded on the state of the system attested 14 Nov 2026
Command to start it
dsoxlab start k8s-detecter-une-persistance -
Contain a denial of service inside its namespace
A workload with no limits runs in a test namespace. Cap that namespace with a quota and default values, prove that a creation beyond the quota is refused and that a container declaring nothing is completed, bound the running workload, and check that an application of another namespace keeps answering while it runs.
Graded on the state of the system attested 14 Nov 2026
Command to start it
dsoxlab start k8s-contenir-un-deni-de-service -
Close the API server profiler, without closing the API
The API server exposes its Go profiler to anyone who can reach it, and a kubeadm cluster leaves it on. Close it and drop the CBC cipher suites, then prove both halves: the profiler answers 404, and the cluster still works.
Graded on the state of the system attested 21 Nov 2026
Command to start it
dsoxlab start cks-api-server-hardening -
Bring down a CIS audit count, and check it with a second audit
kube-bench audits a worker against the CIS benchmark and fails two checks on a stock kubeadm cluster. Fix these two checks, which share one cause, then prove it the only honest way: run the audit again and count.
Graded on the state of the system attested 21 Nov 2026
Command to start it
dsoxlab start cks-cis-benchmark-remediate -
Remove from a worker node what listens without serving Kubernetes
An old server template left three services on the worker k8s-w2.lab, each listening on every interface: rpcbind, an FTP server, and a forgotten HTTP debug tool that serves /etc. Remove them for good, without touching what the node needs to stay a Kubernetes node.
Graded on the state of the system attested 17 Nov 2026
Command to start it
dsoxlab start cks-reduire-la-surface-du-noeud -
Restrict who can log into a worker node, and with what rights
The second worker k8s-w2.lab accepts SSH from every account, with a password, and root may log in. An on-call account holds full sudo rights twice over. Reserve SSH to a named group, by key only, without locking yourself out, and cut the on-call account down to the one command it needs.
Graded on the state of the system attested 17 Nov 2026
Command to start it
dsoxlab start cks-restreindre-l-acces-au-noeud -
Close a worker node to the network, except the flows Kubernetes needs
The worker k8s-w2.lab has no firewall: every listening port answers the whole network. Write an nftables input chain with a drop policy that lets through SSH from administration, the kubelet and the network plugin from the nodes and the Pods, and nothing else, then make it survive a reboot without erasing the rules of kube-proxy and Calico.
Graded on the state of the system attested 17 Nov 2026
Command to start it
dsoxlab start cks-fermer-l-acces-reseau-au-noeud -
Close the API server and the kubelet to anonymous clients without breaking kubeadm join
On the control plane, an anonymous client reads the cluster objects, the kubelet answers it and lets it do anything, and the NodeRestriction admission plugin is gone. Leave anonymous access open to health checks and to the discovery that kubeadm join needs, and to nothing else.
Graded on the state of the system attested 17 Nov 2026
Command to start it
dsoxlab start cks-restreindre-l-acces-anonyme -
Confine a Pod with an AppArmor profile
Load an AppArmor profile on the node, apply it to a container through the securityContext field, and prove that the confinement holds by watching a write the profile forbids fail.
Graded on the state of the system attested 13 Nov 2026
Command to start it
dsoxlab start cks-apparmor-confiner-un-pod -
Deny a system call to a container, and check it from the inside
A container that may call anything the kernel offers. Write a seccomp profile that refuses one family of system calls, apply it, and prove the confinement holds: the forbidden call fails from inside, and everything else still works.
Graded on the state of the system attested 13 Nov 2026
Command to start it
dsoxlab start cks-seccomp-profile -
Reject a privileged Pod at admission, with Pod Security Admission
A namespace that accepts anything, including a Pod that shares the host's PID namespace and runs as root. Turn on the restricted standard so the cluster refuses it at admission, and prove the refusal without creating anything: a server-side dry run goes through admission and writes nothing.
Graded on the state of the system attested 26 Nov 2026
Command to start it
dsoxlab start cks-pod-security-admission -
Take over a privileged Pod in production, without stopping its work
A Pod runs with the host's process namespace, as root, privileged, from a floating tag. Rebuild it without any of that, and prove the difference where it is visible: from inside, the container no longer sees the host.
Graded on the state of the system attested 26 Nov 2026
Command to start it
dsoxlab start cks-secure-existing-pod -
Have the cluster itself reject an unpinned image, with no webhook
A namespace accepts any image, tag and all. Make the API server refuse the ones that are not pinned by digest, with a policy it evaluates itself: no webhook, no controller, nothing to keep running.
Graded on the state of the system attested 13 Nov 2026
Command to start it
dsoxlab start cks-validating-admission-policy -
Unblock a namespace, then validate and modify at admission without a webhook
No Pod can be created in the ateliers namespace any more. Find the webhook that blocks it and remove it, then have the API server itself add a default label and refuse privileged containers, in this namespace only.
Graded on the state of the system attested 23 Nov 2026
Command to start it
dsoxlab start k8s-valider-et-modifier-a-l-admission -
Install Gatekeeper, enforce a rule and read its audit
Install Gatekeeper, then make it refuse in the entrepot namespace every image that does not come from the registry the team allows, and let its audit find the Pod that was already running from another registry.
Graded on the state of the system attested 23 Nov 2026
Command to start it
dsoxlab start k8s-imposer-des-regles-avec-gatekeeper -
Require mTLS in a mesh, and check it with a client left outside
A service mesh accepts plain traffic from anyone, inside the mesh or out. Require mutual TLS, and prove it the only way that counts: a Pod with a sidecar still reaches the service, a Pod without one no longer does.
Graded on the state of the system attested 13 Nov 2026
Command to start it
dsoxlab start cks-istio-mtls-lockdown -
Pin an image by digest, and check the tag is not enough
A Deployment that trusts a mutable tag. Pin it to the immutable digest of the image it actually runs, and prove the pin holds: the declared digest must match what the runtime resolved, not just look like one.
Graded on the state of the system attested 13 Nov 2026
Command to start it
dsoxlab start cks-image-pinned-digest -
Fix a Dockerfile static analysis refuses, without changing the application
A Dockerfile that builds and runs, and that static analysis rejects on five counts. Fix them all without changing what the image does, and prove it by running the analysis again: the five findings must be gone by their identifiers, not by a count that a new rule would break.
Graded on the state of the system attested 26 Nov 2026
Command to start it
dsoxlab start cks-dockerfile-static-analysis -
Sign an image, and check the signature by having another one refused
A local registry holds two images, neither signed. Sign one with cosign, publish the public key, and prove the chain works: the same key must accept the signed image and refuse the other. A verification that accepts everything proves nothing.
Graded on the state of the system attested 13 Nov 2026
Command to start it
dsoxlab start cks-cosign-verify-image -
Replace an image riddled with flaws, and check it with a second scan
A Deployment runs an image three years old. Scan it, pick a replacement, and prove the choice: the test scans both and demands strictly fewer critical findings than the original, which no fixed threshold could measure honestly.
Graded on the state of the system attested 13 Nov 2026
Command to start it
dsoxlab start cks-image-scanning-trivy -
Encrypt Secrets at rest in etcd and limit who reads them
The API server writes Secrets to etcd in clear text, and a ServiceAccount reads every Secret of its namespace. Encrypt Secrets at rest with secretbox, rewrite the ones already there, and reduce the ServiceAccount to the only Secret it needs.
Graded on the state of the system attested 23 Nov 2026
Command to start it
dsoxlab start k8s-chiffrer-les-secrets-au-repos -
Record who reads Secrets, and only the metadata of everything else
The cluster keeps no trace of who reads what. Give the API server an audit policy with two levels, full bodies for Secrets and metadata for everything else, and prove it works by reading the log the cluster has just written.
Graded on the state of the system attested 13 Nov 2026
Command to start it
dsoxlab start cks-audit-log-policy -
Make Falco raise an alert on a shell opened in a protected namespace
Falco runs on the control plane with its shipped rules only. Write the rule the security team asks for: an alert of priority CRITICAL, under an exact name, as soon as a shell starts in a container of the namespace paiements, and nowhere else. The shipped rules must stay untouched.
Graded on the state of the system attested 16 Nov 2026
Command to start it
dsoxlab start cks-falco-detecter-un-shell -
Isolate a Pod from the host kernel, and check it by reading its kernel version
The node offers a second container runtime that runs an application kernel of its own. Put a Pod inside it, and prove the isolation the only way that cannot be faked: from inside, the kernel version is no longer the node's.
Graded on the state of the system attested 13 Nov 2026
Command to start it
dsoxlab start cks-runtime-sandbox-gvisor -
Observe a sensitive file being read with Tetragon, then block it
An API key mounted from a Secret is read by one of the Pods of the namespace comptes. Make Tetragon see these reads, find which Pod and which binary read the key from its events, then switch the policy to blocking: the read is killed, and nothing else is.
Graded on the state of the system attested 21 Nov 2026
Command to start it
dsoxlab start k8s-observer-et-bloquer-avec-tetragon
Challenges
7
A mission to solve without a step-by-step procedure: finding the way is up to you.
-
Give an application its own identity and the least rights
Without guidance, give an observability tool its own identity, let it read the logs of another namespace's Pods and nothing more, cut the token of the Pod that never calls the API, strip the inherited rights of the namespace's default account, and harden the tool without breaking it.
Pass mark 70% attested 13 Nov 2026
Command to start it
dsoxlab start k8s-challenge-identite-et-droits-minimaux -
Detect and contain a persistence and a denial of service
Without guidance, find what an attacker left to keep their access, record it and remove it for good without harming the legitimate application, then cap the namespace where an abusive workload runs, and prove that the cluster refuses what exceeds the cap while another application keeps answering.
Pass mark 70% attested 14 Nov 2026
Command to start it
dsoxlab start k8s-challenge-contenir-une-attaque -
Harden a worker node and the access to the API server, without breaking the cluster
Without guidance, take a worker node delivered from an old server template down to what Kubernetes needs: superfluous services removed, SSH reserved to one group by key, a contractor account stripped of its rights, a kubelet closed to anonymous clients, a firewall that survives a reboot. Then restrict anonymous access to the API server without breaking the health probes or kubeadm join.
Pass mark 70% attested 22 Nov 2026
Command to start it
dsoxlab start k8s-challenge-durcir-les-noeuds-et-l-acces-api -
Enforce an admission rule and check the refusal, on your own and without hints
Without guidance, make the cluster refuse what breaks a security rule: the restricted Pod Security Standard on one namespace, a privileged Pod rebuilt without any of its flaws on another, and a native admission policy that refuses images designated by a tag on a third, without touching the rest.
Pass mark 70% attested 14 Nov 2026
Command to start it
dsoxlab start k8s-challenge-faire-refuser-par-admission -
Let only verified images in, on your own and without hints
Without guidance, pin a Deployment to its digest, clear a Dockerfile of its static analysis findings, sign an image and publish its public key, replace a vulnerable image with one a new scan proves less exposed, and make the cluster refuse at creation any image whose signature does not verify.
Pass mark 70% attested 14 Nov 2026
Command to start it
dsoxlab start k8s-challenge-livrer-une-image-verifiee -
Fix a cluster's CIS findings, on your own and without hints
Without guidance, harden the API server of a kubeadm cluster, fix the finding the CIS audit holds against three control plane components, prove it by running kube-bench again, then give the API server a two-level audit policy and show the trace it writes.
Pass mark 70% attested 14 Nov 2026
Command to start it
dsoxlab start k8s-challenge-durcir-le-plan-de-controle -
Confine a Pod and detect abnormal activity, on your own and without hints
Without guidance, confine Pods against the kernel with AppArmor, seccomp and a sandbox runtime, require mutual TLS in a mesh, close a namespace by default while keeping its application flow and DNS, and make Falco raise an alert when a shell opens in the protected namespace, and only there.
Pass mark 70% attested 15 Nov 2026
Command to start it
dsoxlab start k8s-challenge-confiner-et-detecter
Capstones
1
A wider mission that asks you to combine several skills.
-
Capstone: open an enclave for a team you do not trust
An outside team needs room in your cluster. Give them one that stays safe even if they are not: the cluster itself must refuse what they should not deploy, their identity must be able to do almost nothing, and nothing outside the enclave may reach what runs inside it.
Pass mark 66% attested 13 Nov 2026
Command to start it
dsoxlab start cks-capstone-enclave
Mock exams
1
The format of an exam: a pass mark and a verdict at the end, passed or failed.
-
CKS mock exam: 16 tasks in 120 minutes
A timed mock exam in the CKS format: sixteen tasks spread like the six official domains, on one kubeadm cluster, each task on the host it names, reached by ssh, graded on the cluster's final state, no hint. Plan for 120 minutes.
Pass mark 67% attested 17 Nov 2026
Command to start it
dsoxlab start cks-examen-blanc
End-of-level exams
1
A whole level to validate alone, without hints, graded on the actual state of the system.
-
Level 5 test: secure a cluster
From a weak inherited state and requirements that name no Kubernetes object, secure the cluster hosting the shop: harden its control plane, trace Secret reads, have the cluster refuse what breaks a rule, take back a privileged Pod, confine workloads against the kernel, require mutual TLS and close the network by default, detect a network tool, and let in only a pinned, signed and scanned image, while the shop keeps answering.
Pass mark 70% attested 18 Nov 2026
Command to start it
dsoxlab start k8s-epreuve-securiser-un-cluster