CKS System Hardening Practice Question
A pod is created with the following security context: securityContext: seccompProfile: type: Localhost localhostProfile: profiles/audit.json Where must the 'audit.json' file be placed on the node?
⚠ Common exam trap
The CNCF CKS exam often tests the default seccomp profile root path (`/var/lib/kubelet/seccomp`) and the fact that `localhostProfile` is relative to that root, not an absolute path or a path under `/etc/kubernetes` or containerd directories.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
/var/lib/kubelet/seccomp/profiles/audit.json
When a pod uses a `seccompProfile` of type `Localhost` with `localhostProfile: profiles/audit.json`, the file path is relative to the kubelet's seccomp root directory, which defaults to `/var/lib/kubelet/seccomp`. Therefore, the complete path on the node must be `/var/lib/kubelet/seccomp/profiles/audit.json`. This is the only location where the kubelet will look for the seccomp profile when `type: Localhost` is specified.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
/etc/kubernetes/seccomp/profiles/audit.json
Why it's wrong here
This path is not a valid seccomp profile location because the kubelet only loads profiles from its configured `--seccomp-profile-root` directory, which defaults to `/var/lib/kubelet/seccomp` (with a `profiles` subdirectory). `/etc/kubernetes` is reserved for control-plane artifacts such as kubeadm manifests, certificates, and kubeconfig files, not runtime profile data. Even if a profile file were placed there, a pod with `seccompProfile.type: Localhost` would fail because the kubelet would never search this directory.
- ✗
/var/lib/kubelet/audit.json
Why it's wrong here
This path is under the kubelet data directory but omits both the `seccomp` root and the `profiles` subdirectory that are required by convention. The kubelet joins `--seccomp-profile-root` (default `/var/lib/kubelet/seccomp`) with the `localhostProfile` value from the pod spec, so a profile at `/var/lib/kubelet/audit.json` would only be found if the root were `/var/lib/kubelet` and the profile reference were exactly `audit.json` — neither of which matches the default Kubernetes layout. Thus, the profile would not be discovered and the container would fail to start.
- ✓
/var/lib/kubelet/seccomp/profiles/audit.json
Why this is correct
This is the correct location because the kubelet's default `--seccomp-profile-root` is `/var/lib/kubelet/seccomp`, and the standard practice is to place profile JSON files in a `profiles` subdirectory beneath that root. When a pod references `seccompProfile.type: Localhost` with `localhostProfile: profiles/audit.json`, the kubelet resolves the path to exactly `/var/lib/kubelet/seccomp/profiles/audit.json` and passes the file to the container runtime via CRI. This aligns with Kubernetes documentation and distribution defaults, making it the only viable path for the kubelet to find the profile.
- ✗
/var/lib/containerd/seccomp/audit.json
Why it's wrong here
This path confuses the kubelet's seccomp storage with containerd's own data directory. While containerd enforces seccomp at runtime, the kubelet is the component that resolves and serves profile files to the CRI; the kubelet looks only under its own `--seccomp-profile-root`, which defaults to `/var/lib/kubelet/seccomp`. `/var/lib/containerd` contains containerd's snapshots, metadata, and sandbox state, not Kubernetes profile artifacts, so a profile there would be ignored by the kubelet entirely, causing the pod to fail with an error.
Go deeper
Related to this question
About these practice questions
One of 845 original CKS practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This CKS practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CKS exam.