Certified Kubernetes Security Specialist

CKS practice exam and hands-on tasks

The Certified Kubernetes Security Specialist exam is hands-on: you harden clusters, nodes, workloads and the supply chain, and detect attacks at runtime. It needs an active CKA.

The exam at a glance

Format
Hands-on: tasks on live systems, in a terminal
Duration
120 minutes
Passing score
67%

From the public exam information; check the Linux Foundation's exam page before you book.

Domains and weights

DomainWeight
Minimize Microservice Vulnerabilities20%
Supply Chain Security20%
Monitoring, Logging and Runtime Security20%
Cluster Setup15%
Cluster Hardening15%
System Hardening10%

What you get for CKS

Try it: free examples

Original examples from the CKS course, written by us, not taken from any exam.

Hands-on task: Replace a wildcard role

Time budget: 8 minutes

The ServiceAccount deployer in namespace cks-rbac-web is bound to Role deployer, which allows everything in the namespace. The pipeline only needs to get, list and update Deployments.

Change the Role deployer so it allows exactly that and nothing else. Keep the names of the Role and the binding.

Show the model solution
kubectl -n cks-rbac-web create role deployer --verb=get,list,update --resource=deployments.apps \
  --dry-run=client -o yaml | kubectl apply -f -
kubectl -n cks-rbac-web get role deployer -o yaml      # check that the old "*" rule is gone

kubectl apply replaces the whole rules list, so the wildcard rule disappears. The binding stays valid because its roleRef still names deployer.

Hands-on task: Fix it: an unexpected port is open on a worker

Time budget: 7 minutes

A security scan found TCP port 8021 open on node w1. Nothing on a Kubernetes node should listen there.

  1. Find out which systemd unit opens the port and write its full name (for example name.service) to ~/cks-tasks/footprint/unit.txt on the lab host.
  2. Stop it, and make sure it does not start again after a reboot.
Show the model solution
ssh w1 'sudo ss -tlnp "sport = :8021"'            # users:(("python3",pid=1234,...))
ssh w1 'systemctl status 1234 --no-pager | head -2' # the PID belongs to legacy-share.service
echo legacy-share.service > ~/cks-tasks/footprint/unit.txt
ssh w1 'sudo systemctl disable --now legacy-share.service'

systemctl status <PID> shows which unit a process belongs to. systemctl mask would be even stronger: the unit could not be started by hand either.

Spot the bug

You apply this policy in namespace payments. Right after, every app logs "could not resolve host":

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata: { name: default-deny, namespace: payments }
spec:
  podSelector: {}
  policyTypes: [Ingress, Egress]

What is the fix that keeps the default deny?

  1. Add an egress rule allowing UDP and TCP port 53 to the kube-dns Pods in kube-system
  2. Remove Egress from policyTypes
  3. Change podSelector: {} to podSelector: { matchLabels: { app: dns } }
  4. Create the same policy in kube-system as well
Show the answer
  1. Correct. Egress deny also blocks DNS lookups. Giving DNS back is the standard second half of a default deny.
  2. Not correct. That fixes DNS, but the task wanted a full default deny; now all outgoing traffic is open again.
  3. Not correct. Then the policy only selects Pods labelled app=dns, so the apps are no longer denied anything.
  4. Not correct. That would block DNS for the whole cluster. The problem is egress from payments, not ingress to CoreDNS.

Start free, then choose

The free plan lets you try the first domain of LFCS and KCNA. The CKS exam pass opens everything for CKS for 90 days, paid once; All access opens all six certifications. See pricing.

Frequently asked questions

Is this the official CKS training?

No. Clustiro is independent and not affiliated with the Linux Foundation. You book and take the exam with the Linux Foundation; we help you prepare with original material.

Are these real exam questions?

No. Every question and task is written by us. They follow the published curriculum's domains, weights and style, so the practice is realistic, but none is taken from an exam.

Do I need my own cluster or machines?

Yes: you practise on your own virtual machines, set up in the course's lab lesson. Any Windows, macOS or Linux computer with 16 GB RAM and about 70 GB free disk works (8 GB RAM is enough for LFCS), or a small cloud VM. The app never connects to them; you run the verify commands and mark your result.

How long does preparation take?

It depends on your experience and the time you have each week. The app shows your progress per domain and what to study next; the exam pass gives you 90 days and can be extended.

Other certifications