CKS System Hardening Practice Question
After deploying a pod with an AppArmor profile, the pod status shows 'ContainerCreating' for a long time and then fails. What is the most likely cause?
⚠ Common exam trap
The exam often tests the distinction between AppArmor being enabled on the node versus the profile being loaded; candidates may incorrectly choose 'node does not support AppArmor' when the actual issue is a missing profile, or confuse the annotation-based configuration with a non-existent securityContext field.
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
✓
The AppArmor profile is not loaded on the node
When a pod remains in 'ContainerCreating' state and then fails, it often indicates that the node cannot apply the specified AppArmor profile. The most likely cause is that the profile referenced in the pod annotation (e.g., 'container.apparmor.security.beta.kubernetes.io/<container-name>: localhost/<profile-name>') is not loaded into the node's kernel. Without the profile loaded, the container runtime (e.g., containerd or CRI-O) cannot enforce the policy, causing the pod creation to hang and eventually fail.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The AppArmor profile is not in the same namespace as the pod
Why it's wrong here
AppArmor profiles are not Kubernetes objects and have no namespace association. They are filesystem-level policy files loaded into the kernel on each node, typically under /etc/apparmor.d. A namespaced name in the pod annotation only selects an already-loaded profile on that specific node; if the profile is loaded on a different node or not at all, the pod cannot start. Therefore, a 'mismatched namespace' cannot be the cause—the profile either exists on the node or it does not.
- ✓
The AppArmor profile is not loaded on the node
Why this is correct
When you set an annotation like container.apparmor.security.beta.kubernetes.io/<container>: localhost/<profile>, the CRI runtime checks whether an AppArmor profile named <profile> is currently loaded in the node's kernel, e.g., using /sys/kernel/security/apparmor/profiles or aa-status. If it is not loaded, the container runtime rejects the pod with an error such as 'failed to load AppArmor profile', causing the pod to stay in a pending/container-creating state. The profile must be installed and loaded (via apparmor_parser) prior to pod creation; Kubernetes never loads it automatically.
- ✗
The pod's securityContext does not have 'apparmor: enabled'
Why it's wrong here
There is no 'apparmor: enabled' field in the PodSecurityContext—AppArmor has never been configured that way. The supported mechanism is an annotation on the pod metadata (container.apparmor.security.beta.kubernetes.io/<container>), not a boolean field in securityContext. Adding such a field would be ignored or rejected by the API server, and the annotation already effectively 'enables' AppArmor. So a missing securityContext field is not the reason for failure.
- ✗
The node does not support AppArmor
Why it's wrong here
If the node did not support AppArmor at all (e.g., kernel module not loaded, disabled in kernel cmdline, or container runtime built without AppArmor), a pod with an AppArmor annotation would fail earlier—often during admission or setup—with an error indicating AppArmor is unsupported. The symptom described (a profile that is not loaded) occurs on a node that does support AppArmor but simply lacks that specific profile. Thus, node support is not the issue here.
Go deeper
Related to this question
About these practice questions
This CKS question is part of Courseiva's 845-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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.