Members · Hands-on mock exam · CKS
CKS Hands-on Mock Exam 1
Sixteen CKS-style tasks in two hours on a local kind cluster, in the official domain weights: NetworkPolicies, Ingress TLS, RBAC, ServiceAccount tokens, API server hardening, seccomp, node services, Pod Security, security contexts, encryption at rest, admission policies, Trivy, manifest scanning, audit logging and runtime investigation. Pass mark 67%, like the real exam.
- 16 tasks
- 120 minutes
- 67% to pass
- 1 local cluster
How it works
- Download the kit and run
./setup.sh. It creates 1 kind cluster (kind-cert-cks-a) and prepares every task. You need Docker, kind and kubectl. - Start the timer below and solve the tasks in your terminal, switching to the context each task names, as in the real exam.
- Grade with
./grade.sh: every task is checked on your clusters. Paste the RESULT line here to see your score by domain and save it, then read the solutions.
How this kit differs from the real exam
How this kit differs from the real exam
- The real exam gives you a terminal on a Linux desktop and one SSH-reachable host per task. Here the clusters run
in Docker with kind, and each cluster has a single node (control plane and workloads together). A node is a
container: open a shell on it with
docker exec -it <node> bash, for exampledocker exec -it cert-cks-b-control-plane bash. - If
setup.shfails with "could not find a log line that matches … Multi-User System" while creating the second cluster, your Linux host is out of inotify instances (kind's known issue): runsudo sysctl fs.inotify.max_user_instances=512and startsetup.shagain. - Some tasks need files in the kit folder (
files/<task>/…); paths in the tasks are relative to the kit folder. - Supply-chain tasks need Trivy; run it as
docker run --rm aquasec/trivy image <image>if you don't have it installed. Trivy's database changes over time; the images in these tasks were chosen so the answer doesn't. - Not covered here (practise on a VM): AppArmor profiles (kind nodes can't load them), Falco, gVisor/Kata
RuntimeClasses, Cilium/Istio pod-to-pod encryption and
kubeadm upgrade. Our CKS concept quizzes cover them.
Tasks
| # | Task | Domain | Weight |
|---|---|---|---|
| 1 | Block the cloud metadata endpoint | Cluster Setup | 8% |
| 2 | Serve an Ingress over TLS | Cluster Setup | 7% |
| 3 | Replace cluster-admin with a namespaced Role | Cluster Hardening | 6% |
| 4 | Short-lived ServiceAccount token instead of the default mount | Cluster Hardening | 5% |
| 5 | Restore API server hardening flags | Cluster Hardening | 4% |
| 6 | Run a pod with a custom seccomp profile | System Hardening | 5% |
| 7 | Remove an unneeded network service from a node | System Hardening | 5% |
| 8 | Enforce restricted Pod Security on a namespace | Minimize Microservice Vulnerabilities | 6% |
| 9 | Harden a container's security context | Minimize Microservice Vulnerabilities | 6% |
| 10 | Encrypt Secrets at rest | Minimize Microservice Vulnerabilities | 8% |
| 11 | Admission policy for trusted registries | Supply Chain Security | 7% |
| 12 | Remove pods with critical vulnerabilities | Supply Chain Security | 6% |
| 13 | Fix findings from a manifest scan | Supply Chain Security | 7% |
| 14 | Turn on API audit logging | Monitoring, Logging and Runtime Security | 7% |
| 15 | Find and stop a suspicious workload | Monitoring, Logging and Runtime Security | 7% |
| 16 | Immutable container with a writable scratch directory | Monitoring, Logging and Runtime Security | 6% |
Domain mix
- Cluster Setup · 15%
- Cluster Hardening · 15%
- System Hardening · 10%
- Minimize Microservice Vulnerabilities · 20%
- Supply Chain Security · 20%
- Monitoring, Logging and Runtime Security · 20%
CKS study guide · Written by our team; not real exam tasks.