Skip to main content

CKS practice questions

The CKS is a 2-hour hands-on exam in a terminal, based on Kubernetes v1.37. You must hold the CKA first. It has six domains:

DomainWeightQuestions here
Cluster Setup15%4
Cluster Hardening15%4
System Hardening10%4
Minimize Microservice Vulnerabilities20%5
Supply Chain Security20%5
Monitoring, Logging and Runtime Security20%5

The questions are original and unofficial, not taken from the real exam. Domains and weights come from the official curriculum, as listed on Learning paths & certifications. The real exam has you harden a live cluster, so practice in the Hands-on labs.

Cluster Setup (15%)​

  1. You must block all incoming and outgoing Pod traffic in namespace payments by default. Which NetworkPolicy does that?
  2. An Ingress serves HTTPS for shop.example.com. What must spec.tls[].secretName point to?
  3. With cert-manager installed, which object do you create to have it issue a certificate and keep it renewed in a Secret?
  4. Pods in namespace apps must not reach the cloud instance metadata endpoint at 169.254.169.254. Which egress rule allows everything else but blocks that?

Study: Blocking and Allowing Traffic (NetworkPolicy), Ingress Rules and TLS, Automatic TLS Certificates with cert-manager

Cluster Hardening (15%)​

  1. A CI system needs a short-lived token for the ServiceAccount deployer. What is the recommended way to get one?
  2. How do you list every action the ServiceAccount web in namespace shop is allowed to do there?
  3. Which kubelet configuration makes unauthenticated requests to the kubelet API fail and sends authorization checks to the API server?
  4. Why does keeping the cluster on a recent Kubernetes version count as hardening?

Study: Who Can Do What (RBAC), How a Pod Proves Who It Is (ServiceAccount Tokens), How an API Request Gets Stored, Upgrading a cluster with kubeadm (CKA)

System Hardening (10%)​

  1. An AppArmor profile named k8s-deny-write is loaded on every node. How do you apply it to one container?
  2. You want containers to run with the container runtime default seccomp filter. Which setting does that?
  3. Which Pod setting lets a container see and signal every process on the node?
  4. A Pod needs to read one cloud storage bucket. Which is the least-privilege setup?

Study: Runtime security — catching abnormal behavior (CKS), Pod Security Standards and securityContext, Permission Checks on One API Request (IAM)

Minimize Microservice Vulnerabilities (20%)​

  1. Which namespace label makes the API server reject Pods that break the restricted Pod Security Standard?
  2. Which container securityContext passes the restricted Pod Security Standard?
  3. You created a ValidatingAdmissionPolicy with a CEL rule, but bad Deployments are still accepted. What is most likely missing?
  4. You enabled Secret encryption at rest with an EncryptionConfiguration (aescbc first). Are the Secrets that already exist now encrypted in etcd?
  5. In an Istio mesh, which resource forces workloads in a namespace to accept only mutual TLS traffic?

Study: Pod Security Standards and securityContext, Admission Policies with CEL and Webhooks, Keeping Secrets Safe, Namespaces and Resource Quotas, Service Mesh ① Sidecars and Mutual Authentication

Supply Chain Security (20%)​

  1. A manifest uses image: nginx:1.27. How do you make sure the exact same image bytes run every time?
  2. Which command lists only HIGH and CRITICAL vulnerabilities in an image with Trivy?
  3. What does an SBOM give you?
  4. The image was signed with cosign and a key pair. Which command checks the signature before you deploy?
  5. Only images from registry.example.com may run in the cluster. Where do you enforce that?

Study: Image and Supply Chain Security, How an Image Is Built and Run, Pulling Images from a Private Registry

Monitoring, Logging and Runtime Security (20%)​

  1. Your audit policy must record who reads or changes Secrets without writing the Secret values into the log. Which level do you use for secrets?
  2. An audit policy has a rule for secrets at level Metadata, followed by a catch-all rule at level RequestResponse. Which level applies to a Secret read?
  3. You added --audit-policy-file and --audit-log-path to the kube-apiserver static Pod manifest, and the API server does not come back. What is the usual cause?
  4. Falco raises "Terminal shell in container" for a Pod. What is Falco watching to detect that?
  5. Which setting makes a running container closest to immutable?

Study: Runtime security — catching abnormal behavior (CKS), Audit Logs, Viewing the cluster through the 4Cs and a threat model (KCSA·KCNA)