Sample questions
Certified Kubernetes Security Specialist CKS practice questions
A DevOps team uses a CI/CD pipeline to build container images and push them to a private registry. To minimize the risk of supply chain attacks, which of the following is the most…
Arrange the steps to create and enforce a Pod Security Policy (PSP) in a Kubernetes cluster.
You are using `crictl` to debug a container that is not responding. Which command should you use to get the list of running containers?
Monitoring, Logging and Runtime SecuritymediumSee the answer and why each option is right or wrong →You are responding to a security incident where a pod named `compromised-pod` in namespace `default` is suspected of being used for cryptocurrency mining. You need to immediately i…
Monitoring, Logging and Runtime SecuritymediumSee the answer and why each option is right or wrong →A cluster has both ImagePolicyWebhook and a mutating webhook that adds a sidecar. The admin notices that even when ImagePolicyWebhook rejects an image, the mutating webhook has alr…
An OPA/Gatekeeper ConstraintTemplate is written to enforce that all Deployments have the label 'app.kubernetes.io/name'. However, the Constraint does not deny Deployments without t…
You are auditing RBAC and find a ClusterRoleBinding named 'admin-binding' that binds the 'cluster-admin' ClusterRole to a service account in the 'default' namespace. What is the se…
You are a security engineer for a financial services company running a Kubernetes cluster with 50 nodes. The cluster uses containerd as the container runtime and Calico for network…
You are implementing supply chain security for container images. Which tool would you use to scan a local directory of Dockerfiles and Kubernetes manifests for known vulnerabilitie…
A security admin runs 'trivy image --severity CRITICAL,HIGH myrepo/myapp:latest' and sees many CVEs. The admin wants to ensure that only images with no CRITICAL or HIGH severity vu…
Which of the following is a best practice for storing sensitive data like passwords in Kubernetes?
A Falco rule is written to detect when a shell is spawned inside a container. The rule condition is: `spawned_process and container and proc.name = bash`. The rule is not triggerin…
Which TWO of the following are valid arguments for the kubectl command to create a secret from a file? (Select TWO)
A pod running in the cluster is in a CrashLoopBackOff state. You run 'kubectl describe pod <pod>' and see the following event: 'Warning BackOff Back-off restarting failed container…
Which of the following is a best practice for securing container images?
You want to run a container with gVisor (runsc) runtime for sandboxing. Which resource is required to use a non-default runtime?
You need to encrypt Kubernetes secrets at rest. Which resource should you configure?
What is the purpose of setting a container's filesystem to read-only in a Pod spec?
A pod is running in a namespace that has a Kyverno policy requiring all images to come from a trusted registry. The pod is using an image from an untrusted registry. What will happ…
A security engineer needs to ensure that all communication between nodes and the control plane is encrypted. Which component must be configured with a TLS certificate to achieve th…
A security team wants to use OPA/Gatekeeper to enforce that all namespaces must have a label 'security-tier' with value 'high' or 'medium'. What is the correct approach?
An administrator runs kube-bench on a cluster node and receives failures for CIS benchmark checks related to kubelet configuration. Which kubelet flag should be set to ensure that…
You are configuring encryption at rest for Kubernetes secrets. After creating an EncryptionConfiguration with aescbc provider, which additional step is required to enable encryptio…
You are asked to generate an SBOM for a container image and attach it as an attestation using cosign. Which two commands would you run in sequence?