Linux Foundation CKS Practice Exam Questions & Answers

5 Free Questions · Last reviewed: August 30, 2026 · Prepared & Reviewed by the ValidExamDumps Editorial Team

Exam Facts

Linux Foundation CKS Exam Details

Key details for this exam, checked against the published exam outline

64 Practice Questions (Our Bank)
120 minutes Exam Duration
67% Passing Score
USD 445 Exam Fee
Exam Code
CKS
Full Name
Certified Kubernetes Security Specialist
Issuing Body
Linux Foundation and Cloud Native Computing Foundation (CNCF)
Question Format (Our Bank)
Multiple Choice
Delivery
Online proctored, remote with live proctor monitoring via webcam and screen sharing
Eligibility
Candidate must have taken and passed the Certified Kubernetes Administrator (CKA) exam prior to attempting the CKS exam
Validity
2 years from the date the certification is awarded
Practice Questions

Free CKS Practice Questions

Each question shows the correct answer and an explanation of why it is right

VA
ValidExamDumps Editorial Team Every question and its answer is checked by our CKS exam preparation team, who also write the explanation shown with each one. How we research and review these pages
Question 1

SIMULATION

Cluster:qa-cluster

Master node:masterWorker node:worker1

You can switch the cluster/configuration context using the following command:

[desk@cli] $kubectl config use-context qa-cluster

Task:

Create a NetworkPolicy namedrestricted-policyto restrict access to Podproductrunning in namespacedev.

Only allow the following Pods to connect to Pod products-service:

1. Pods in the namespaceqa

2. Pods with labelenvironment: stage, in any namespace

Correct Answer: A
Question 2

SIMULATION

Documentation

Installing the Sidecar, PeerAuthentication, Deployments

You must connect to the correct host . Failure to do so may result in a zero score.

[candidate@base] $ ssh cks000041

Context

A microservices-based application using unencrypted Layer 4 (L4) transport must be secured with Istio.

Task

Perform the following tasks to secure an existing application's Layer 4 (L4) transport communication using Istio.

Istio is installed to secure Layer 4 (L4) communications.

You may use your browser to access Istio's documentation.

First, ensure that all Pods in the mtls namespace have the istio-proxy sidecar injected.

Next, configure mutual authentication in strict mode for all workloads in the mtls namespace.

Correct Answer: A
Explanation

Below is the CKS exam-ready, step-by-step solution for QUESTION 15.

Follow exactly in this order. No extra changes.

QUESTION 15 --- Istio mTLS (EXAM MODE)

1) Connect to the correct host

ssh cks000041

sudo -i

export KUBECONFIG=/etc/kubernetes/admin.conf

2) Ensure sidecar injection is enabled for the mtls namespace

2.1 Check current namespace labels

kubectl get ns mtls --show-labels

2.2 Enable automatic Istio sidecar injection

kubectl label namespace mtls istio-injection=enabled --overwrite

Verify:

kubectl get ns mtls --show-labels | grep istio-injection

Expected:

istio-injection=enabled

3) Ensure ALL Pods get the istio-proxy sidecar

Existing Pods will not get sidecars automatically.

You must restart workloads in the namespace.

3.1 Restart all Deployments in mtls

kubectl -n mtls rollout restart deployment

3.2 Verify Pods now have 2 containers (app + istio-proxy)

kubectl -n mtls get pods

Then check one Pod:

kubectl -n mtls get pod -o jsonpath='{.spec.containers[*].name}{'\n'}'

Expected output includes:

istio-proxy

4) Configure mutual TLS (mTLS) in STRICT mode

4.1 Create a PeerAuthentication for the mtls namespace

cat <<EOF | kubectl apply -f -

apiVersion: security.istio.io/v1beta1

kind: PeerAuthentication

metadata:

name: mtls-strict

namespace: mtls

spec:

mtls:

mode: STRICT

EOF

5) Verify mTLS policy is applied

kubectl -n mtls get peerauthentication

kubectl -n mtls describe peerauthentication mtls-strict

Expected:

Mode: STRICT

6) Final verification (exam confidence check)

6.1 Confirm all Pods are Running

kubectl -n mtls get pods

6.2 Confirm sidecar injection everywhere

kubectl -n mtls get pods -o jsonpath='{range .items[*]}{.metadata.name}{' -> '}{.spec.containers[*].name}{'\n'}{end}'

Each line must include istio-proxy.

Question 3

SIMULATION

You can switch the cluster/configuration context using the following command:

[desk@cli] $kubectl config use-context dev

Context:

A CIS Benchmark tool was run against the kubeadm created cluster and found multiple issues that must be addressed.

Task:

Fix all issues via configuration and restart the affected components to ensure the new settings take effect.

Fix all of the following violations that were found against the API server:

1.2.7authorization-modeargument is not set toAlwaysAllow FAIL

1.2.8authorization-modeargument includesNode FAIL

1.2.7authorization-modeargument includesRBAC FAIL

Fix all of the following violations that were found against the Kubelet:

4.2.1 Ensure that theanonymous-auth argumentis set to false FAIL

4.2.2authorization-modeargument is not set to AlwaysAllow FAIL (UseWebhookautumn/authz where possible)

Fix all of the following violations that were found against etcd:

2.2 Ensure that theclient-cert-authargument is set to true

Correct Answer: A
Explanation

worker1 $ vim /var/lib/kubelet/config.yaml

anonymous:

enabled: true #Delete this

enabled: false #Replace by this

authorization:

mode: AlwaysAllow #Delete this

mode: Webhook #Replace by this

worker1 $ systemctl restart kubelet. # To reload kubelet config

ssh to master1

master1 $ vim /etc/kubernetes/manifests/kube-apiserver.yaml

- -- authorization-mode=Node,RBAC

master1 $ vim /etc/kubernetes/manifests/etcd.yaml

- --client-cert-auth=true

Explanation

ssh to worker1

worker1 $ vim /var/lib/kubelet/config.yaml

apiVersion: kubelet.config.k8s.io/v1beta1

authentication:

anonymous:

enabled: true #Delete this

enabled: false #Replace by this

webhook:

cacheTTL: 0s

enabled: true

x509:

clientCAFile: /etc/kubernetes/pki/ca.crt

authorization:

mode: AlwaysAllow #Delete this

mode: Webhook #Replace by this

webhook:

cacheAuthorizedTTL: 0s

cacheUnauthorizedTTL: 0s

cgroupDriver: systemd

clusterDNS:

- 10.96.0.10

clusterDomain: cluster.local

cpuManagerReconcilePeriod: 0s

evictionPressureTransitionPeriod: 0s

fileCheckFrequency: 0s

healthzBindAddress: 127.0.0.1

healthzPort: 10248

httpCheckFrequency: 0s

imageMinimumGCAge: 0s

kind: KubeletConfiguration

logging: {}

nodeStatusReportFrequency: 0s

nodeStatusUpdateFrequency: 0s

resolvConf: /run/systemd/resolve/resolv.conf

rotateCertificates: true

runtimeRequestTimeout: 0s

staticPodPath: /etc/kubernetes/manifests

streamingConnectionIdleTimeout: 0s

syncFrequency: 0s

volumeStatsAggPeriod: 0s

worker1 $ systemctl restart kubelet. # To reload kubelet config

ssh to master1

master1 $ vim /etc/kubernetes/manifests/kube-apiserver.yaml

master1 $ vim /etc/kubernetes/manifests/etcd.yaml

Question 4

SIMULATION

Cluster: dev

Master node:master1

Worker node:worker1

You can switch the cluster/configuration context using the following command:

[desk@cli] $kubectl config use-context dev

Task:

Retrieve the content of the existing secret namedadamin thesafenamespace.

Store the username field in a file names/home/cert-masters/username.txt, and the password field in a file named/home/cert-masters/password.txt.

1. You must create both files; they don't exist yet.

2. Do not use/modify the created files in the following steps, create new temporary files if needed.

Create a new secret namesnewsecretin thesafenamespace, with the following content:

Username:dbadmin

Password:moresecurepas

Finally, create a new Pod that has access to the secretnewsecretvia a volume:

Namespace: safe

Pod name: mysecret-pod

Container name: db-container

Image: redis

Volume name: secret-vol

Mount path: /etc/mysecret

Correct Answer: A
Question 5

SIMULATION

Task

Create a NetworkPolicy named pod-access to restrict access to Pod users-service running in namespace dev-team.

Only allow the following Pods to connect to Pod users-service:

Correct Answer: A
Get Full Access

64 questions covering all exam domains, starting from $20

Study Guide

What the Linux Foundation CKS Exam Covers

6 domains from the Linux Foundation CKS exam outline, with approximate weightings. Every sample question above is tagged with the domain it comes from

Domain 1: Cluster Setup 15%

Use network security policies to restrict cluster level access. Review security configurations of Kubernetes components like etcd and kubelet against CIS benchmarks to identify and remediate misconfigurations.

Domain 2: Cluster Hardening 15%

Restrict access to the Kubernetes API through RBAC and minimize exposure of service accounts by disabling defaults and enforcing least privilege permissions. Keep Kubernetes updated to patch security vulnerabilities.

Domain 3: System Hardening 10%

Reduce the attack surface of host operating systems by minimizing IAM roles and external network access. Apply kernel hardening tools like AppArmor and seccomp to enforce additional security boundaries.

Domain 4: Minimize Microservice Vulnerabilities 20%

Set up OS level security domains using Pod Security Policies and OPA to isolate workloads. Implement pod to pod encryption through mutual TLS and manage secrets securely.

Domain 5: Supply Chain Security 20%

Minimize base image footprint and establish registry whitelist policies. Sign and validate container images, scan for known vulnerabilities, and perform static analysis of Kubernetes manifests and Dockerfiles.

Domain 6: Monitoring, Logging and Runtime Security 20%

Perform behavioral analysis of syscalls and file activities at container and host level to detect threats. Use audit logs to monitor API access and maintain container immutability at runtime.

FAQ

CKS Exam FAQ

Common questions about the exam itself

Do I need a current CKA certification to take CKS, or is a past certification enough?
You must have achieved the CKA certification at some point in your career, but it does not need to be currently active. The certification can be achieved, renewed, or expired and still qualify you to schedule CKS.
What makes CKS significantly harder than CKA?
CKS is performance-based with 15 to 20 hands-on tasks in a live Kubernetes environment where you must configure security controls under time pressure. Unlike CKA which tests administration skills, CKS demands expertise across six security domains and requires investigation and troubleshooting of security incidents.
Which CKS domain do most candidates struggle with most?
Supply Chain Security and Runtime Monitoring together account for 40% of the exam and involve tasks like image scanning with tools such as Trivy, vulnerability analysis, and interpreting audit logs and runtime alerts. These require understanding of tool ecosystems beyond core Kubernetes.
How long should I realistically prepare for CKS if I already hold CKA?
Most candidates with strong CKA knowledge need 8 to 12 weeks of hands-on practice to develop confidence across all six domains. The gap is not breadth of Kubernetes knowledge but depth in security tools and techniques like NetworkPolicies, RBAC hardening, and runtime visibility.
What exactly happens on CKS exam day and how is it different from taking it at a test center?
You take the exam remotely from your own environment with a live proctor monitoring your screen and webcam throughout the entire two hour session. The proctor can see your terminal, verify your identity, and you cannot use any resources outside the exam console except the official Kubernetes documentation.
If I fail CKS, how quickly can I retake it and what is the cost?
Your exam fee of $445 includes one free retake. You can schedule another attempt immediately after receiving your results, though the Linux Foundation recommends waiting at least two weeks to prepare.
How long does my CKS certification stay valid and what do I need to do to renew it?
Your CKS certification is valid for two years from the date you earn it. To renew it before expiration, you take and pass the exam again. Since June 18, 2026, passing CKS also automatically renews your CKA certification through the CARE program if it is not yet expired.
Which job roles does CKS certification prepare me for?
CKS targets platform engineers running Kubernetes in production, security engineers responsible for container infrastructure, and DevSecOps practitioners embedding security controls into delivery pipelines. It assumes CKA level fluency and is not appropriate for people new to either Kubernetes or security.
How does CKS relate to the other Kubernetes certifications like KCNA and KCSA?
KCNA is foundational Kubernetes knowledge with no prerequisites. KCSA is entry level cloud native security requiring no prior cert. CKS is advanced and requires prior CKA certification. KCSA sits between KCNA and CKS in difficulty and is a faster entry point to security without needing live cluster hands on work.
What should I do differently when preparing for CKS versus CKA?
CKS demands speed and accuracy in a live environment under pressure. Practice exclusively with only the official Kubernetes documentation available, time every task from start to finish, and focus on verification because partial credit is limited. A policy that looks correct but has a YAML indentation error scores nothing.