Certified Kubernetes Application Developer (CKAD) Practice Exam
Practice questions for the Linux Foundation / CNCF Certified Kubernetes Application Developer (CKAD) exam, aligned with the Kubernetes v1.37 curriculum: application design and build with container images, multi-stage builds, tags, digests and pull policies, Deployments, DaemonSets, StatefulSets, Jobs and CronJobs, init containers, native sidecars and multi-container patterns, and emptyDir, persistent, projected and ephemeral volumes; application deployment with blue/green and canary releases, rolling updates and rollbacks, Helm and Kustomize; application observability and maintenance with API deprecations, liveness, readiness and startup probes, kubectl top, events and logs, and debugging with kubectl debug and common Pod failure states; application environment, configuration and security with CRDs and operators, RBAC and kubectl auth can-i, admission control and Pod Security Admission, requests, limits, ResourceQuota, LimitRange, QoS and in-place resize, ConfigMaps, Secrets, ServiceAccounts and security contexts; and services and networking with NetworkPolicies, ClusterIP, NodePort, LoadBalancer, headless and ExternalName Services, DNS and Ingress. Every question includes a written explanation.
100 questions · 12 free preview
Studying more than one? All CNCF exams for $29 · every exam for $79
Free sample questions
- Sample · question 1 · Generating a Pod manifest skeleton
During a timed task, a developer at Poldark Ceramics wants a starting YAML file for a Pod called `kiln` running nginx:1.29 with label tier=web, written to kiln.yaml without creating anything. Which command produces it?
- A.kubectl run kiln --image=nginx:1.29 --labels=tier=web --dry-run=client -o yaml > kiln.yamlcorrect
- B.kubectl run kiln --image=nginx:1.29 --labels=tier=web --dry-run=server > kiln.yaml
- C.kubectl create pod kiln --image=nginx:1.29 --labels=tier=web -o yaml > kiln.yaml
- D.kubectl get pod kiln --image=nginx:1.29 -o yaml --export > kiln.yaml
Why: kubectl run creates a Pod, and --dry-run=client -o yaml prints the object it would send without contacting the cluster for creation, which makes a quick skeleton. There is no `kubectl create pod` generator. --dry-run=server without -o yaml prints only a one-line message, and kubectl get reads existing objects (the --export flag was removed long ago).
Open this question on its own page → - Sample · question 2 · Downward API Pod IP as env
An app at Tregothnan Tea must log its own Pod IP address at startup, read from an environment variable named MY_POD_IP. Which env entry supplies it?
- A.{name: MY_POD_IP, valueFrom: {configMapKeyRef: {name: pod, key: ip}}}
- B.{name: MY_POD_IP, value: $(POD_IP)}
- C.{name: MY_POD_IP, valueFrom: {resourceFieldRef: {resource: status.podIP}}}
- D.{name: MY_POD_IP, valueFrom: {fieldRef: {fieldPath: status.podIP}}}correct
Why: The downward API exposes Pod fields to environment variables through valueFrom.fieldRef, and status.podIP is a supported field path. resourceFieldRef is for container requests and limits, $(POD_IP) only expands variables already defined in the container, and a ConfigMap cannot know each Pod's IP.
Open this question on its own page → - Sample · question 3 · fsGroup for shared volume ownership
Containers at Lanhydrock Studio run as UID 1001 and must write to a mounted volume whose files are owned by root. The storage driver supports ownership management. Which Pod-level setting makes the volume group-writable for the containers?
- A.securityContext: {seLinuxOptions: {level: s0}}
- B.securityContext: {runAsGroup: 0}
- C.securityContext: {fsGroup: 2000}correct
- D.securityContext: {supplementalGroups: [0], readOnlyRootFilesystem: true}
Why: fsGroup makes the kubelet change group ownership of supported volumes to that GID, set group write permissions, and add the GID to the container processes, so non-root containers can write. Running with group 0 grants root-group access but does not change volume ownership. readOnlyRootFilesystem is a container field and makes things less writable, and SELinux levels do not alter POSIX ownership.
Open this question on its own page → - Sample · question 4 · Indexed Job completion index
A rendering Job at Mevagissey Films must split work into 8 shards, where each Pod knows which shard number (0-7) it owns without any external queue. Which Job configuration provides this?
- A.completions: 8 with podFailurePolicy, reading the restart count
- B.completionMode: Indexed with completions: 8, reading the JOB_COMPLETION_INDEX environment variablecorrect
- C.A CronJob with 8 schedules, one for each shard number
- D.completionMode: NonIndexed with parallelism: 8, reading the HOSTNAME suffix
Why: In an Indexed Job, each Pod gets a completion index from 0 to completions-1, exposed in the JOB_COMPLETION_INDEX environment variable and an annotation. NonIndexed Pods have random name suffixes, so no stable shard number. podFailurePolicy controls failure handling, and eight CronJob schedules would be a clumsy workaround that runs at different times.
Open this question on its own page → - Sample · question 5 · Pulling and unpacking a chart locally
A developer at Fowey Marine wants to edit the templates of chart `acme/queue` from a repository already added to Helm, so they need the chart files in a local directory. Which command gets them?
- A.helm get all acme/queue
- B.helm pull acme/queue --untarcorrect
- C.helm repo index acme/queue
- D.helm show readme acme/queue --untar
Why: helm pull downloads a chart archive from a repository, and --untar extracts it into a directory you can edit. helm get works on installed releases, helm repo index builds an index file for a repository you host, and helm show readme only prints the chart's README.
Open this question on its own page → - Sample · question 6 · Kustomize namePrefix and references
A base at Kynance Water defines ConfigMap `settings` and a Deployment that mounts it. The overlay adds `namePrefix: qa-`. What does the rendered output contain?
- A.Both objects unchanged, because namePrefix only adds a label
- B.ConfigMap qa-settings, while the Deployment still references settings
- C.ConfigMap qa-settings, with the Deployment's volume reference also changed to qa-settingscorrect
- D.ConfigMap settings unchanged, because namePrefix affects only Deployments
Why: namePrefix prepends the prefix to the names of all resources in the kustomization and updates known references, such as ConfigMap volume and envFrom references in Pod templates, so the Deployment points to qa-settings. It is not limited to Deployments, and it changes names rather than adding labels.
Open this question on its own page → - Sample · question 7 · Watching Pod status changes live
A developer at Porthleven Bakery has just applied a Deployment and wants to see Pods move through ContainerCreating to Running in the terminal as it happens, without rerunning the command. Which command fits?
- A.kubectl get pods -l app=bakery -wcorrect
- B.kubectl describe pods -l app=bakery --tail
- C.kubectl get pods -l app=bakery --sort-by=status
- D.kubectl top pods -l app=bakery --follow
Why: The -w (--watch) flag keeps kubectl get open and prints a new line each time a matching Pod changes. --sort-by only orders a single listing, describe has no --tail option, and kubectl top shows usage metrics and has no --follow flag.
Open this question on its own page → - Sample · question 8 · tcpSocket probe for a non-HTTP server
A Redis-compatible cache at Zennor Systems listens on TCP 6379 and has no HTTP endpoint or health command in the image. Which readiness check is the simplest built-in option?
- A.readinessProbe: {exec: {command: [redis-cli, ping]}}
- B.readinessProbe: {tcpSocket: {port: 6379}}correct
- C.readinessProbe: {httpGet: {port: 6379, path: /}}
- D.readinessProbe: {grpc: {port: 6379}}
Why: A tcpSocket probe succeeds if the kubelet can open a TCP connection to the port, which needs nothing in the image. httpGet would send HTTP that the server does not speak, the exec probe needs a client binary the image lacks, and a grpc probe requires the gRPC health service.
Open this question on its own page → - Sample · question 9 · ExternalName Service for an outside host
Apps at Polperro Freight call a managed database at db.partner-cloud.example. The team wants in-cluster clients to use the stable name `orders-db` so the target can change later without app changes. Which Service fits?
- A.type: NodePort with nodePort: 30432
- B.type: LoadBalancer with loadBalancerClass: partner
- C.type: ExternalName with externalName: db.partner-cloud.examplecorrect
- D.type: ClusterIP with selector app=orders-db
Why: An ExternalName Service makes cluster DNS return a CNAME record for the given external hostname, so orders-db resolves to the managed database with no proxying. A selector-based ClusterIP needs in-cluster Pods, and NodePort or LoadBalancer Services expose in-cluster backends outward rather than aliasing an outside host.
Open this question on its own page → - Sample · question 10 · StatefulSet per-Pod DNS name
StatefulSet `kafka` at Morwenstow Data uses headless Service `kafka-hl` in namespace `stream`, with the default cluster domain. What is the DNS name of the first broker Pod?
- A.kafka-0.kafka-hl.stream.svc.cluster.localcorrect
- B.kafka-1.stream.kafka-hl.svc.cluster.local
- C.kafka.kafka-hl-0.stream.pod.cluster.local
- D.kafka-hl-0.kafka.stream.svc.cluster.local
Why: StatefulSet Pods are named <statefulset>-<ordinal> starting at 0 and get records of the form <pod>.<governing-service>.<namespace>.svc.<cluster-domain>. The other options swap the Service and StatefulSet names, start at ordinal 1, or use the wrong label order.
Open this question on its own page → - Sample · question 11 · Ways to consume a Secret in a container
A developer at Carbis Labs must give a container access to the `api-key` value stored in Secret `vendor-creds`. Which approaches are valid? (Select TWO.)
- A.A Pod annotation secret.kubernetes.io/inject: vendor-creds
- B.An env entry with valueFrom.secretKeyRef naming vendor-creds and key api-keycorrect
- C.A volume of type secret for vendor-creds, mounted into the containercorrect
- D.An envFrom entry with secretKeyRef naming vendor-creds and key api-key
- E.An env entry with valueFrom.configMapKeyRef naming vendor-creds
Why: Secrets reach containers through env variables (valueFrom.secretKeyRef for one key, or envFrom with secretRef for all keys) or as files from a secret volume. configMapKeyRef reads ConfigMaps, not Secrets. envFrom takes secretRef rather than secretKeyRef, and no built-in annotation injects Secrets.
Open this question on its own page → - Sample · question 12 · Checking quota usage in a namespace
Pods at Truro Outfitters are rejected for exceeding quota. A developer wants to see, for each tracked resource in namespace `shop`, how much is used against the hard limit. Which command shows this?
- A.kubectl get limitrange -n shop -o wide
- B.kubectl top namespace shop
- C.kubectl auth can-i create pods -n shop --quota
- D.kubectl describe resourcequota -n shopcorrect
Why: kubectl describe resourcequota lists each resource with its Used and Hard values, showing what remains. kubectl top does not report namespaces or quotas, a LimitRange holds per-object defaults and bounds rather than aggregate usage, and auth can-i checks RBAC and has no --quota flag.
Open this question on its own page →
Like the sample?
Other practice exams
- AnthropicClaude Certified Architect — Foundations100 questions · $19
- AnthropicClaude Certified Architect — Professional100 questions · $19
- CompTIACompTIA Security+ (SY0-701)100 questions · $19
- CompTIACompTIA Network+ (N10-009)100 questions · $19
- ISC2CISSP100 questions · $19
- DatabricksDatabricks Data Engineer Associate100 questions · $19
- DatabricksDatabricks Data Engineer Professional100 questions · $19
- DatabricksDatabricks Generative AI Engineer Associate100 questions · $19
- Google CloudGoogle Cloud Associate Cloud Engineer100 questions · $19
- Google CloudGoogle Cloud Professional Cloud Architect100 questions · $19
- Google CloudGoogle Cloud Professional Data Engineer100 questions · $19
- Google CloudGoogle Cloud Professional Machine Learning Engineer100 questions · $19
- HashiCorpTerraform Associate (004)100 questions · $19
- CNCFCertified Kubernetes Administrator (CKA)100 questions · $19
- PalantirPalantir Data Engineer Associate100 questions · $19
- PalantirPalantir AI Engineer Associate100 questions · $19
- NVIDIANVIDIA Generative AI LLMs Associate (NCA-GENL)100 questions · $19
- Microsoft Power BI & FabricPower BI Data Analyst (PL-300)100 questions · $19
- Microsoft Power BI & FabricFabric Analytics Engineer (DP-600)100 questions · $19
- Microsoft Power BI & FabricFabric Data Engineer (DP-700)100 questions · $19
- SnowflakeSnowPro Core (COF-C03)250 questions · $19
- SnowflakeSnowPro Advanced: Data Engineer100 questions · $19
- SnowflakeSnowPro Advanced: Architect100 questions · $19
- AWSAWS Cloud Practitioner (CLF-C02)100 questions · $19
- AWSAWS Solutions Architect Associate (SAA-C03)100 questions · $19
- AWSAWS AI Practitioner (AIF-C01)100 questions · $19
- AWSAWS Developer Associate (DVA-C03)100 questions · $19
- AWSAWS Solutions Architect Professional (SAP-C03)100 questions · $19
- AWSAWS Data Engineer Associate (DEA-C01)100 questions · $19
- AWSAWS Machine Learning Engineer Associate (MLA-C02)100 questions · $19
- AWSAWS Generative AI Developer Professional (AIP-C01)100 questions · $19
- Microsoft AzureAzure Fundamentals (AZ-900)100 questions · $19
- Microsoft AzureAzure Administrator (AZ-104)100 questions · $19
- Microsoft AzureAzure AI Fundamentals (AI-901)100 questions · $19
- Microsoft AzureAzure AI Cloud Developer (AI-200)100 questions · $19
- Microsoft AzureAzure Solutions Architect Expert (AZ-305)100 questions · $19