Members · Hands-on mock exam · CKS

CKS Hands-on Mock Exam 2

Sixteen more CKS-style tasks (different from mock exam 1) in two hours on a local kind cluster, in the official domain weights: NetworkPolicies, kubelet hardening, anonymous API access, RBAC for users, ServiceAccount tokens, seccomp, host access, Pod Security, Secrets, encryption provider order, admission policies, Trivy, Dockerfile review, audit-log forensics and runtime investigation. Pass mark 67%, like the real exam.

  • 16 tasks
  • 120 minutes
  • 67% to pass
  • 1 local cluster

How it works

  1. 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.
  2. Start the timer below and solve the tasks in your terminal, switching to the context each task names, as in the real exam.
  3. 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 example docker exec -it cert-cks-b-control-plane bash.
  • If setup.sh fails 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): run sudo sysctl fs.inotify.max_user_instances=512 and start setup.sh again.
  • 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

#TaskDomainWeight
1Default-deny ingress with one exceptionCluster Setup8%
2Fix kubelet CIS findingsCluster Setup7%
3Scope a user's permissions downCluster Hardening6%
4Stop automounting API tokens in a namespaceCluster Hardening5%
5Close anonymous access to the APICluster Hardening4%
6Apply the runtime's default seccomp profileSystem Hardening5%
7Remove host access from a workloadSystem Hardening5%
8Baseline enforcement with restricted warningsMinimize Microservice Vulnerabilities6%
9Move a password out of the pod specMinimize Microservice Vulnerabilities6%
10Fix the encryption provider orderMinimize Microservice Vulnerabilities8%
11Reject the latest tagSupply Chain Security7%
12Scale down workloads with critical vulnerabilitiesSupply Chain Security6%
13Fix a Dockerfile before it shipsSupply Chain Security7%
14Find who deleted a ConfigMap in the audit logMonitoring, Logging and Runtime Security7%
15Find a workload calling homeMonitoring, Logging and Runtime Security7%
16Immutable web serverMonitoring, Logging and Runtime Security6%

Domain mix

CKS study guide · Written by our team; not real exam tasks.

Was this page helpful?

Report a mistake