AMAADOR ACADEMYCertificatesVerify a certificate

PRO-CNCF-CKS

Final check — Certified Kubernetes Security Specialist (CKS) - Exam-Prep

Answer the 60 questions. You need 80% or more to pass. You can retry as many times as you like.

Study the course →

Question 1You must restrict a namespace so that pods receive NO ingress traffic by default, then selectively allow it. Which NetworkPolicy correctly implements a default-deny-ingress baseline?
Question 2Pods in the 'payments' namespace can still reach pods in 'frontend' despite an ingress NetworkPolicy on frontend. What is the MOST likely cause?
Question 3You want to allow ingress to 'db' pods ONLY from pods labeled role=api located in namespaces labeled tier=backend. Which selector combination is correct?
Question 4During a CIS Kubernetes Benchmark review of the kube-apiserver, which setting should be flagged as a finding?
Question 5kube-bench reports a FAIL on '/var/lib/kubelet/config.yaml' file permissions. Which remediation aligns with the CIS Benchmark?
Question 6You are configuring TLS termination for an Ingress resource. Which field references the Kubernetes Secret holding the certificate and key?
Question 7An Ingress TLS Secret must be created from a cert and key. Which Secret type is required for the Ingress controller to consume it as TLS?
Question 8You want every namespace except 'kube-system' to enforce the 'restricted' Pod Security Standard via the built-in admission controller. Which mechanism do you use?
Question 9A pod manifest sets securityContext.privileged: true. Under the 'restricted' Pod Security Standard, what happens at admission?
Question 10To satisfy the 'restricted' Pod Security Standard, which securityContext settings must a pod use?
Question 11You apply 'pod-security.kubernetes.io/audit: baseline' but no enforce label. A pod violating baseline is created. What is the result?
Question 12A team needs strong isolation between tenant workloads sharing a node, beyond what namespaces and PSS provide. Which approach gives kernel-level isolation?
Question 13You run a static analysis tool (e.g., kubesec or Trivy config scan) against a Deployment manifest. Which finding represents the HIGHEST security risk?
Question 14You must block any pod that mounts the host's root filesystem path '/' as a hostPath volume. Which admission approach is the BEST fit?
Question 15An ImagePolicyWebhook admission controller is enabled but pods with unsigned images are still admitted when the webhook is unreachable. What configuration causes fail-open behavior?
Question 16You want admission control to REJECT any container image not pulled from your trusted registry 'registry.corp.internal'. Which control implements this declaratively?
Question 17Static analysis flags a Deployment that grants the pod's service account 'automountServiceAccountToken: true' though the app never calls the API. What is the correct hardening fix?
Question 18To enforce mutual TLS and per-pod identity between microservices WITHOUT modifying application code, which approach is most appropriate?
Question 19A NetworkPolicy allows egress on TCP 443 to an ipBlock but pods still cannot resolve service names. What did the policy author most likely forget?
Question 20In a CIS Benchmark audit you find etcd is reachable without client certificate authentication. Which kube-apiserver/etcd flags remediate this CRITICAL finding?
Question 21A pod uses the default ServiceAccount in the 'web' namespace, but it does not call the Kubernetes API. Which configuration best follows the principle of least privilege for the API token?
Question 22You must allow a user to read Pods in namespace 'dev' only. Which pair of objects correctly scopes this access?
Question 23An auditor wants to know exactly which verbs a given user can perform on Secrets in 'prod'. Which command answers this most directly?
Question 24By default, Kubernetes stores Secret objects in etcd in which form?
Question 25To enable encryption at rest for Secrets, where do you configure the EncryptionConfiguration and which component must reference it?
Question 26After adding an aescbc provider to the EncryptionConfiguration, existing Secrets in etcd remain in their old (unencrypted) form. What re-encrypts them?
Question 27A Falco rule should alert when a shell is spawned inside any container. Which Falco field condition best expresses 'a process started that is a shell'?
Question 28Falco runs as a DaemonSet and you want it to detect syscalls reliably across kernels without compiling a kernel module per node. Which driver is the recommended modern choice?
Question 29You want the API server to log the request and response bodies for create/delete on Secrets, but only metadata for reads. Which audit policy construct controls this?
Question 30Which kube-apiserver flag set enables audit logging to a file on disk?
Question 31A workload must read a database password from a Secret without exposing it in the pod spec or env dumps. Which mount approach also lets the value update without a pod restart?
Question 32To make running containers immutable so an attacker cannot write new binaries to the container filesystem, which securityContext setting is correct?
Question 33An attacker compromised a pod whose ServiceAccount token can 'create pods' cluster-wide. Beyond removing the binding, which audit-log query best confirms whether the token was abused?
Question 34Which statement about a RoleBinding that references a ClusterRole is correct?
Question 35You need pod-to-pod traffic encrypted in transit across nodes without modifying application code. Which approach fits CKS scope?
Question 36Anonymous requests are hitting the API server. Which kube-apiserver flag disables unauthenticated access?
Question 37A Falco alert fires constantly for a legitimate backup job that opens many files. What is the cleanest way to stop the noise without disabling the whole rule?
Question 38Which RBAC permission is the most dangerous to grant broadly because it effectively allows privilege escalation by impersonation?
Question 39You want to ensure audit logs cannot be tampered with after an incident on a single control-plane node. Which practice best supports log immutability?
Question 40A token-based ServiceAccount in 'ci' must push to the API only from a specific automation. Which modern Kubernetes feature lets you issue short-lived, audience-bound tokens instead of long-lived auto-mounted ones?
Question 41You write a seccomp profile and want to apply the kubelet's default profile (RuntimeDefault) to a Pod without specifying a custom file. Which securityContext field correctly enables this?
Question 42A custom seccomp profile JSON must live where, by default, so that a Pod referencing it via localhostProfile can be loaded by the kubelet on each node?
Question 43A seccomp profile uses defaultAction SCMP_ACT_ERRNO and lists specific syscalls with SCMP_ACT_ALLOW. What is the practical effect on the container?
Question 44You loaded an AppArmor profile named 'k8s-deny-write' on a node and set it to enforce mode. How do you apply it to a container in Kubernetes 1.30+?
Question 45After referencing an AppArmor profile in a Pod spec, the Pod stays in Blocked/error state. Which is the most likely root cause to check first?
Question 46On a worker node, which command lets you confirm an AppArmor profile is loaded and in enforce mode before scheduling Pods against it?
Question 47To harden the host OS of a Kubernetes node, you want to reduce attack surface by disabling an unused, internet-facing service. Which approach best fits CKS host-hardening guidance?
Question 48You are minimizing a container image. Which change most directly reduces the supply-chain attack surface of the final image?
Question 49Why is referencing a base image by its sha256 digest preferred over a mutable tag in supply-chain hardening?
Question 50Using cosign, your team signs images and wants admission to reject unsigned images. Which mechanism enforces signature verification at deploy time?
Question 51You must restrict which container registries are allowed cluster-wide so only images from registry.corp.internal can run. Which is the most appropriate control?
Question 52An ImagePolicyWebhook is configured in the API server admission chain. If the webhook backend is unreachable and defaultAllow is false, what happens to new Pods using images?
Question 53You scan an image with Trivy and it reports a CRITICAL CVE in a base OS package you do not use. What is the most robust supply-chain remediation?
Question 54In a Pod, you want to prevent the application from ever writing to its container filesystem to support immutability. Which setting achieves this?
Question 55To run a container as a non-root user and reject the image if it tries to run as root, which combination is correct?
Question 56The 'restricted' Pod Security Standard is enforced on a namespace. Which Pod spec would be REJECTED?
Question 57You enable the Pod Security Admission label mode that blocks violating Pods at creation. Which label value enforces this?
Question 58A Falco rule should detect a shell spawned inside a container at runtime. Which Falco condition element targets that behavior?
Question 59You configure API server audit logging. Which two flags are essential to enable structured audit events to a file?
Question 60To encrypt Secrets at rest in etcd, you set up an EncryptionConfiguration. Which API server flag points to it, and what should be true of provider ordering?