Kubernetes Security Essentials: CNPA practice questions
Kubernetes security for a platform team is mostly about safe defaults applied consistently, so that every namespace a team receives starts out locked down. The essentials fall into a handful of areas, each with a built-in mechanism.
By Ibrahim Yesilay · Published · Updated
Independent community practice, not affiliated with or endorsed by CNCF or The Linux Foundation.
What Kubernetes Security Essentials covers in CNPA
Kubernetes security for a platform team is mostly about safe defaults applied consistently, so that every namespace a team receives starts out locked down. The essentials fall into a handful of areas, each with a built-in mechanism.
Access to the API comes first. Every request is authenticated and then authorized, usually by RBAC. The RBAC API declares four kinds of object: Role and ClusterRole hold sets of permissions, and RoleBinding and ClusterRoleBinding grant them to users, groups or service accounts. Roles and RoleBindings are namespaced, while the cluster variants apply across the cluster. Permissions are purely additive and there are no deny rules, so least privilege means granting only what is needed rather than taking rights away later. Workloads authenticate with service accounts. Current clusters give Pods short-lived, automatically rotating tokens obtained through the TokenRequest API, and a Pod that does not need the API can set automountServiceAccountToken to false.
Workload hardening is defined by the Pod Security Standards. Privileged is unrestricted and meant for trusted system and infrastructure workloads. Baseline is minimally restrictive, prevents known privilege escalations and allows the default Pod configuration. Restricted follows current Pod hardening best practices, for example requiring containers to run as non-root and to drop all capabilities. The built-in Pod Security admission controller applies a level per namespace, and the Kubernetes security checklist asks that an appropriate level be applied and enforced for all namespaces. Pod Security admission replaced PodSecurityPolicy, which has been removed.
Network access is controlled with NetworkPolicies; a platform commonly gives each namespace a default-deny posture and opens required flows deliberately. Secrets need care. By default they are stored unencrypted in etcd, the values in manifests are only base64 encoded, and anyone with API access to read Secrets, or access to etcd, can retrieve them. The documentation recommends enabling encryption at rest and configuring least-privilege access to Secrets.
The cluster's own configuration and supply chain matter too. The checklist covers keeping the API server, kubelet API and etcd off the public internet, limiting access to etcd, and enabling seccomp and AppArmor or SELinux on nodes that support them. For images, a digest is an immutable hash of the content, while a tag can be moved to point at a different image.
For a platform, these controls become part of the golden path. New namespaces arrive with RBAC bindings for the owning team, a Pod Security level, default network policies and resource quotas, and policy engines enforce whatever the built-ins do not cover.
Misconceptions include believing base64 is encryption, that a namespace isolates workloads without further controls, that RBAC can deny a specific action, and that PodSecurityPolicy is still available.
At associate level, expect questions on the three Pod Security levels, how the RBAC objects fit together, why secrets need encryption at rest and tight access, and which control addresses a given risk.
Key points
- RBAC uses Role, ClusterRole, RoleBinding and ClusterRoleBinding; permissions are additive with no deny rules.
- Pod Security Standards define Privileged, Baseline and Restricted levels, enforced per namespace.
- Secrets are stored unencrypted in etcd by default; enable encryption at rest and least-privilege access.
- Service account tokens are short-lived and rotated; disable automounting where the API is not needed.
Three sample questions
9 CNPA questions on Kubernetes Security Essentials, 9 with explanations. How practice works
Question 1
payments that does not mention Secrets and binds it to the same user. Can the user still read Secrets in payments?- A.Only if the RoleBinding is deleted first.
- B.Yes; RBAC permissions are purely additive and there are no deny rules.
- C.No; omitting Secrets from a Role acts as an implicit deny.
- D.No; the namespaced Role overrides the ClusterRole inside its namespace.
Correct answer: B
payments. Why the other options are wrong. "Only if the RoleBinding is deleted first.": The RoleBinding adds permissions; it does not remove the ClusterRole grant, so nothing needs deleting for the read to work. "No; omitting Secrets from a Role acts as an implicit deny.": RBAC has no deny rules, implicit or explicit. "No; the namespaced Role overrides the ClusterRole inside its namespace.": RBAC has no override or precedence between grants; all grants are combined.Sources: CNCF CNPA curriculum (CNPA_Curriculum.pdf), Kubernetes: Using RBAC authorization
Question 2
restricted Pod Security Standard to existing namespaces without breaking running deployments. Which Pod Security Admission mode reports violations to users while still allowing the Pods?- A.baseline
- B.warn
- C.enforce
- D.privileged
Correct answer: B
Sources: CNCF CNPA curriculum (CNPA_Curriculum.pdf), Kubernetes: Pod Security Admission, Kubernetes: Pod Security Standards
Question 3
api Pods and has Ingress in its policyTypes, allowing traffic only from Pods labelled role=frontend. What happens to ingress for the api Pods?- A.Their ingress is unchanged, but their egress is now blocked except to frontend Pods.
- B.Every Pod in the namespace, including Pods the policy does not select, becomes isolated.
- C.They become isolated for ingress, accepting only traffic that an applying policy allows.
- D.Nothing changes for them until a separate deny-all policy is added to the namespace.
Correct answer: C
Sources: CNCF CNPA curriculum (CNPA_Curriculum.pdf), Kubernetes: Network policies
Practice this topic
Focus mode keeps every question on Kubernetes Security Essentials until you leave it. 10 free guest answers, then a free account; no credit card.
Or open CNPA practice across all topics.
Sources
The explanation above was checked against these official documents.
- Kubernetes documentation: Using RBAC Authorization (checked 2026-10-28)
- Kubernetes documentation: Pod Security Standards (checked 2026-10-28)
- Kubernetes documentation: Service Accounts (checked 2026-10-28)
- Kubernetes documentation: Secrets (checked 2026-10-28)
- Kubernetes documentation: Security Checklist (checked 2026-10-28)
- Kubernetes documentation: Images (checked 2026-10-28)