Brutal, precise, fast practice. These exercises reproduce the task types and the recurring patterns of the CKAD. Time yourself and aim for 80% success. A capstone and then a 120-minute mock exam, with no hints, close the page.
What you will learn
This page trains you on the CKAD tasks, domain by domain, then puts you through two tests with no hints. By the end, you will be able to:
- run each exercise within the target time, using the
kubectlreflexes of the exam; - handle the tasks of the curriculum domains: application design and build, deployment, observability, configuration and security, networking;
- spot your weak points with the time summary;
- deliver an application from a simple set of requirements, in the capstone;
- measure your level on the 120-minute mock exam, with a pass mark of 66 out of 100.
CKAD habits
Set up your environment before you start. On the exam, the ssh hosts already have kubectl, the k alias and completion; on your own cluster, these settings are up to you:
# Essential aliasesalias k=kubectlalias kn='kubectl config set-context --current --namespace'alias kgp='kubectl get pods'export do="--dry-run=client -o yaml"export now="--force --grace-period=0"
# Autocompletionsource <(kubectl completion bash)complete -F __start_kubectl k
# Working namespacekubectl create ns ckad-exerciseskn ckad-exercisesApplication Design & Build (20%)
Exercise 1: multi-container Pod (sidecar)
Target time: 4 minutes
| Context | Namespace ckad-exercises |
|---|---|
| Task | Create a Pod log-processor with a container app (busybox:1.37) that writes "Processing..." to /logs/app.log every 5s, and a sidecar reader that reads this file continuously |
| Constraint | Both containers share an emptyDir volume mounted on /logs |
| Validation | kubectl logs log-processor -c reader prints "Processing..." |
Solution
kubectl apply -f - <<'EOF'apiVersion: v1kind: Podmetadata: name: log-processor namespace: ckad-exercisesspec: containers: - name: app image: busybox:1.37@sha256:bdf57e528e45e4433820e045b29b4597825a1c9e38353532d90a01445013f82e command: ['sh', '-c', 'while true; do echo "Processing..." >> /logs/app.log; sleep 5; done'] volumeMounts: - name: logs mountPath: /logs - name: reader image: busybox:1.37@sha256:bdf57e528e45e4433820e045b29b4597825a1c9e38353532d90a01445013f82e command: ['sh', '-c', 'tail -f /logs/app.log'] volumeMounts: - name: logs mountPath: /logs volumes: - name: logs emptyDir: {}EOF
# Validationkubectl logs log-processor -c reader -n ckad-exercisesExercise 2: Init Container
Target time: 3 minutes
| Context | Namespace ckad-exercises |
|---|---|
| Task | Create a Pod web-init with an init container init-config that creates /config/app.conf containing "ready=true", then a container web (nginx:1.30.6) that mounts this volume |
| Constraint | emptyDir volume named config, mounted on /config (init) and /etc/app (web) |
| Validation | kubectl exec web-init -- cat /etc/app/app.conf returns "ready=true" |
Solution
kubectl apply -f - <<'EOF'apiVersion: v1kind: Podmetadata: name: web-init namespace: ckad-exercisesspec: initContainers: - name: init-config image: busybox:1.37@sha256:bdf57e528e45e4433820e045b29b4597825a1c9e38353532d90a01445013f82e command: ['sh', '-c', 'echo "ready=true" > /config/app.conf'] volumeMounts: - name: config mountPath: /config containers: - name: web image: nginx:1.30.6@sha256:42c68eab6f7e22611786a9fe1d1c019e275c50185bd54b8f75dc2b9184322703 volumeMounts: - name: config mountPath: /etc/app volumes: - name: config emptyDir: {}EOF
# Validationkubectl exec web-init -n ckad-exercises -- cat /etc/app/app.confApplication Deployment (20%)
Exercise 3: Deployment with an explicit label
Target time: 4 minutes
| Context | Namespace ckad-exercises |
|---|---|
| Task | Create a Deployment api with 3 replicas, image nginx:1.30.5, and the label app=api on the Pods. Add CPU requests (100m) to prepare for the HPA |
| Constraint | The label app=api must be defined explicitly (do not rely on the label that kubectl create deploy adds on its own) |
| Validation | kubectl get pods -l app=api shows 3 pods |
Solution
kubectl apply -f - <<'EOF'apiVersion: apps/v1kind: Deploymentmetadata: name: api namespace: ckad-exercisesspec: replicas: 3 selector: matchLabels: app: api template: metadata: labels: app: api spec: containers: - name: nginx image: nginx:1.30.5@sha256:9bf97bd7714f5e24c1ccd545ecb9eb5435cb6d109c97cebb15e7e455e0239edb resources: requests: cpu: 100mEOF
# Validationkubectl get pods -l app=api -n ckad-exercisesKey point: kubectl create deploy generates the label app=<name> automatically, but here we define it explicitly to control the selectors.
Exercise 4: Rolling Update and Rollback
Target time: 3 minutes
| Context | Deployment api created in exercise 3 |
|---|---|
| Task | Update the image to nginx:1.30.6 with maxSurge=1 and maxUnavailable=0, then roll back to nginx:1.30.5 |
| Validation | kubectl get deploy api -o jsonpath='{.spec.template.spec.containers[0].image}' returns an image that starts with nginx:1.30.5 |
Solution
# Apply the strategykubectl patch deploy api -n ckad-exercises -p '{"spec":{"strategy":{"type":"RollingUpdate","rollingUpdate":{"maxSurge":1,"maxUnavailable":0}}}}'
# Updatekubectl set image deploy api nginx=nginx:1.30.6@sha256:42c68eab6f7e22611786a9fe1d1c019e275c50185bd54b8f75dc2b9184322703 -n ckad-exerciseskubectl rollout status deploy api -n ckad-exercises
# Rollbackkubectl rollout undo deploy api -n ckad-exercises
# Validationkubectl get deploy api -n ckad-exercises -o jsonpath='{.spec.template.spec.containers[0].image}'Exercise 5: Horizontal Pod Autoscaler
Target time: 3 minutes
| Context | Deployment api with CPU requests defined |
|---|---|
| Task | Create an HPA api-hpa: min 2, max 10, target CPU 70% |
| Constraint | Requires a working Metrics Server |
| Validation | kubectl get hpa api-hpa shows the HPA |
Solution
kubectl autoscale deploy api -n ckad-exercises --name=api-hpa --min=2 --max=10 --cpu=70%
# Validationkubectl get hpa api-hpa -n ckad-exercisesKey point: a CPU-based HPA needs resources.requests.cpu on the Pods and a working Metrics Server.
Application Observability & Maintenance (15%)
Exercise 6: complete probes
Target time: 5 minutes
| Context | Namespace ckad-exercises |
|---|---|
| Task | Create a Pod health-check (nginx:1.30.6) with a liveness probe (HTTP GET /, delay 10s, period 5s), a readiness probe (delay 5s, period 3s) and a startup probe (failureThreshold 30, period 2s) |
| Validation | kubectl describe pod health-check shows the 3 probes configured |
Solution
kubectl apply -f - <<'EOF'apiVersion: v1kind: Podmetadata: name: health-check namespace: ckad-exercisesspec: containers: - name: nginx image: nginx:1.30.6@sha256:42c68eab6f7e22611786a9fe1d1c019e275c50185bd54b8f75dc2b9184322703 ports: - containerPort: 80 livenessProbe: httpGet: path: / port: 80 initialDelaySeconds: 10 periodSeconds: 5 readinessProbe: httpGet: path: / port: 80 initialDelaySeconds: 5 periodSeconds: 3 startupProbe: httpGet: path: / port: 80 failureThreshold: 30 periodSeconds: 2EOF
# Validationkubectl describe pod health-check -n ckad-exercises | grep -E "Liveness|Readiness|Startup"Exercise 7: debugging, missing ConfigMap
Target time: 4 minutes
| Context | Pod broken-app does not start |
|---|---|
| Task | Find out why the Pod stays in ContainerCreating, create the missing resource, and check that the Pod starts |
| Validation | kubectl get pod broken-app shows Running |
First create the faulty Pod:
kubectl apply -f - <<'EOF'apiVersion: v1kind: Podmetadata: name: broken-app namespace: ckad-exercisesspec: containers: - name: app image: nginx:1.30.6@sha256:42c68eab6f7e22611786a9fe1d1c019e275c50185bd54b8f75dc2b9184322703 command: ['sh', '-c', 'cat /config/settings.conf && nginx -g "daemon off;"'] volumeMounts: - name: config mountPath: /config volumes: - name: config configMap: name: app-settingsEOFSolution
# Diagnosiskubectl get pod broken-app -n ckad-exerciseskubectl describe pod broken-app -n ckad-exercises | tail -15# FailedMount event: MountVolume.SetUp failed for volume "config" : configmap "app-settings" not found
# Create the missing ConfigMapkubectl create cm app-settings -n ckad-exercises --from-literal=settings.conf="debug=true"
# Wait for the kubelet to retry the mountkubectl get pod broken-app -n ckad-exercises -w
# Validationkubectl get pod broken-app -n ckad-exercisesAs long as the ConfigMap is missing, the Pod stays in ContainerCreating, because the kubelet cannot mount the volume. It retries the mount with a delay that doubles after each failure, up to 2 min 2 s at most. So the Pod starts by itself, without having to be recreated, shortly after the ConfigMap is created. To avoid waiting, delete the Pod with kubectl delete pod broken-app -n ckad-exercises, then run the creation command again: the new Pod starts over with a fresh delay.
Environment, Configuration & Security (25%)
Exercise 8: ConfigMap as environment variables
Target time: 3 minutes
| Context | Namespace ckad-exercises |
|---|---|
| Task | Create a ConfigMap db-config with DB_HOST=mysql.default.svc and DB_PORT=3306, then a Pod backend (busybox:1.37) that injects these values as environment variables |
| Validation | kubectl logs backend prints DB_HOST=mysql.default.svc |
Solution
kubectl create cm db-config -n ckad-exercises \ --from-literal=DB_HOST=mysql.default.svc \ --from-literal=DB_PORT=3306
kubectl apply -f - <<'EOF'apiVersion: v1kind: Podmetadata: name: backend namespace: ckad-exercisesspec: containers: - name: backend image: busybox:1.37@sha256:bdf57e528e45e4433820e045b29b4597825a1c9e38353532d90a01445013f82e command: ['sh', '-c', 'env | grep DB_ && sleep 3600'] envFrom: - configMapRef: name: db-configEOF
# Validationkubectl logs backend -n ckad-exercises | grep DB_Exercise 9: Secret as a file
Target time: 4 minutes
| Context | Namespace ckad-exercises |
|---|---|
| Task | Create a Secret api-creds with username=admin and token=abc123xyz, then a Pod api-client that mounts this Secret in /etc/credentials, read-only |
| Validation | kubectl exec api-client -- cat /etc/credentials/username returns admin |
Solution
kubectl create secret generic api-creds -n ckad-exercises \ --from-literal=username=admin \ --from-literal=token=abc123xyz
kubectl apply -f - <<'EOF'apiVersion: v1kind: Podmetadata: name: api-client namespace: ckad-exercisesspec: containers: - name: client image: busybox:1.37@sha256:bdf57e528e45e4433820e045b29b4597825a1c9e38353532d90a01445013f82e command: ['sh', '-c', 'ls /etc/credentials && sleep 3600'] volumeMounts: - name: creds mountPath: /etc/credentials readOnly: true volumes: - name: creds secret: secretName: api-credsEOF
# Validationkubectl exec api-client -n ckad-exercises -- cat /etc/credentials/usernameExercise 10: Requests and Limits
Target time: 3 minutes
| Context | Namespace ckad-exercises |
|---|---|
| Task | Create a Pod resource-pod (nginx:1.30.6) with requests of 100m CPU / 128Mi RAM and limits of 200m CPU / 256Mi RAM |
| Validation | kubectl describe pod resource-pod shows the configured resources |
Solution
kubectl apply -f - <<'EOF'apiVersion: v1kind: Podmetadata: name: resource-pod namespace: ckad-exercisesspec: containers: - name: nginx image: nginx:1.30.6@sha256:42c68eab6f7e22611786a9fe1d1c019e275c50185bd54b8f75dc2b9184322703 resources: requests: cpu: 100m memory: 128Mi limits: cpu: 200m memory: 256MiEOF
# Validationkubectl describe pod resource-pod -n ckad-exercises | grep -A4 "Limits\|Requests"Exercise 11: ServiceAccount without an auto-mounted token
Target time: 4 minutes
| Context | Namespace ckad-exercises |
|---|---|
| Task | Create a ServiceAccount app-sa, then a Pod sa-pod (nginx:1.30.6) that uses this SA with automountServiceAccountToken: false |
| Validation | kubectl exec sa-pod -- ls /var/run/secrets/kubernetes.io/serviceaccount fails (directory does not exist) |
Solution
kubectl create sa app-sa -n ckad-exercises
kubectl apply -f - <<'EOF'apiVersion: v1kind: Podmetadata: name: sa-pod namespace: ckad-exercisesspec: serviceAccountName: app-sa automountServiceAccountToken: false containers: - name: nginx image: nginx:1.30.6@sha256:42c68eab6f7e22611786a9fe1d1c019e275c50185bd54b8f75dc2b9184322703EOF
# Validationkubectl exec sa-pod -n ckad-exercises -- ls /var/run/secrets/kubernetes.io/serviceaccount 2>&1 | grep -i "no such"Exercise 12: SecurityContext
Target time: 4 minutes
| Context | Namespace ckad-exercises |
|---|---|
| Task | Create a Pod secure-pod (busybox:1.37) with runAsUser 1000, runAsGroup 3000, fsGroup 2000, and readOnlyRootFilesystem true |
| Validation | kubectl logs secure-pod prints uid=1000 gid=3000 groups=2000,3000 |
Solution
kubectl apply -f - <<'EOF'apiVersion: v1kind: Podmetadata: name: secure-pod namespace: ckad-exercisesspec: securityContext: runAsUser: 1000 runAsGroup: 3000 fsGroup: 2000 containers: - name: secure image: busybox:1.37@sha256:bdf57e528e45e4433820e045b29b4597825a1c9e38353532d90a01445013f82e command: ['sh', '-c', 'id && sleep 3600'] securityContext: readOnlyRootFilesystem: trueEOF
# Validationkubectl logs secure-pod -n ckad-exercisesExercise 13: PersistentVolumeClaim
Target time: 5 minutes
| Context | Namespace ckad-exercises |
|---|---|
| Task | Create a PVC data-pvc (500Mi, RWO, default StorageClass), then a Pod data-pod (nginx:1.30.6) that mounts this PVC in /data |
| Constraint | The StorageClass must support dynamic provisioning (standard on kind) |
| Validation | kubectl get pvc data-pvc shows Bound |
Solution
kubectl apply -f - <<'EOF'apiVersion: v1kind: PersistentVolumeClaimmetadata: name: data-pvc namespace: ckad-exercisesspec: accessModes: - ReadWriteOnce resources: requests: storage: 500Mi---apiVersion: v1kind: Podmetadata: name: data-pod namespace: ckad-exercisesspec: containers: - name: nginx image: nginx:1.30.6@sha256:42c68eab6f7e22611786a9fe1d1c019e275c50185bd54b8f75dc2b9184322703 volumeMounts: - name: data mountPath: /data volumes: - name: data persistentVolumeClaim: claimName: data-pvcEOF
# Validationkubectl get pvc data-pvc -n ckad-exerciseskubectl exec data-pod -n ckad-exercises -- df -h /dataServices & Networking (20%)
Exercise 14: ClusterIP Service
Target time: 2 minutes
| Context | Deployment api with label app=api |
|---|---|
| Task | Create a Service api-svc of type ClusterIP that exposes the Deployment on port 8080 → port 80 of the Pods |
| Constraint | The selector must be app=api |
| Validation | kubectl get endpointslice -l kubernetes.io/service-name=api-svc shows IPs |
Solution
kubectl apply -f - <<'EOF'apiVersion: v1kind: Servicemetadata: name: api-svc namespace: ckad-exercisesspec: selector: app: api ports: - port: 8080 targetPort: 80EOF
# Validationkubectl get svc api-svc -n ckad-exerciseskubectl get endpointslice -n ckad-exercises -l kubernetes.io/service-name=api-svcExercise 15: NodePort Service
Target time: 3 minutes
| Context | Namespace ckad-exercises |
|---|---|
| Task | Create a new Deployment web (2 replicas, nginx:1.30.6, label app=web) and a NodePort Service web-np on port 30080 |
| Validation | kubectl get svc web-np shows type NodePort with port 30080 |
Solution
kubectl create deploy web --image=nginx:1.30.6@sha256:42c68eab6f7e22611786a9fe1d1c019e275c50185bd54b8f75dc2b9184322703 --replicas=2 -n ckad-exercises
kubectl apply -f - <<'EOF'apiVersion: v1kind: Servicemetadata: name: web-np namespace: ckad-exercisesspec: type: NodePort selector: app: web ports: - port: 80 targetPort: 80 nodePort: 30080EOF
# Validationkubectl get svc web-np -n ckad-exercisesExercise 16: Ingress
Target time: 4 minutes
| Context | Service web-np exposing the Deployment web |
|---|---|
| Task | Create an Ingress web-ingress that routes web.demo.test/ to the Service web-np port 80 |
| Constraint | Use ingressClassName: traefik |
| Validation | kubectl get ingress web-ingress shows the Ingress created |
Solution
kubectl apply -f - <<'EOF'apiVersion: networking.k8s.io/v1kind: Ingressmetadata: name: web-ingress namespace: ckad-exercisesspec: ingressClassName: traefik rules: - host: web.demo.test http: paths: - path: / pathType: Prefix backend: service: name: web-np port: number: 80EOF
# Validationkubectl get ingress web-ingress -n ckad-exercisesNote: the Ingress API remains relevant for the CKAD, even though the ecosystem is moving toward the Gateway API.
Exercise 17: NetworkPolicy, allow a specific source
Target time: 5 minutes
| Context | Deployment api with label app=api |
|---|---|
| Task | Create a NetworkPolicy api-policy that allows ingress traffic on port 80 only from Pods with the label role=frontend |
| Constraint | The CNI must support NetworkPolicies |
| Validation | kubectl describe netpol api-policy shows the rule |
Solution
kubectl apply -f - <<'EOF'apiVersion: networking.k8s.io/v1kind: NetworkPolicymetadata: name: api-policy namespace: ckad-exercisesspec: podSelector: matchLabels: app: api policyTypes: - Ingress ingress: - from: - podSelector: matchLabels: role: frontend ports: - protocol: TCP port: 80EOF
# Testkubectl run frontend --image=busybox:1.37@sha256:bdf57e528e45e4433820e045b29b4597825a1c9e38353532d90a01445013f82e -n ckad-exercises \ --labels="role=frontend" --rm -it -- wget -qO- --timeout=2 api-svc:8080
# Validationkubectl describe netpol api-policy -n ckad-exercisesBatch Jobs (part of Design & Build)
Exercise 18: Job with parallelism
Target time: 3 minutes
| Context | Namespace ckad-exercises |
|---|---|
| Task | Create a Job batch-job that runs 5 tasks (completions), at most 2 in parallel, image busybox:1.37, command echo "Task done" && sleep 5 |
| Validation | kubectl get job batch-job shows 5/5 completions |
Solution
kubectl apply -f - <<'EOF'apiVersion: batch/v1kind: Jobmetadata: name: batch-job namespace: ckad-exercisesspec: completions: 5 parallelism: 2 template: spec: containers: - name: worker image: busybox:1.37@sha256:bdf57e528e45e4433820e045b29b4597825a1c9e38353532d90a01445013f82e command: ['sh', '-c', 'echo "Task done" && sleep 5'] restartPolicy: NeverEOF
# Observekubectl get pods -n ckad-exercises -l job-name=batch-job -wExercise 19: CronJob
Target time: 3 minutes
| Context | Namespace ckad-exercises |
|---|---|
| Task | Create a CronJob cleanup-job that runs every 5 minutes, keeps 3 successful jobs and 1 failed one, command echo "Cleanup at $(date)" |
| Validation | kubectl get cronjob cleanup-job shows the schedule */5 * * * * |
Solution
kubectl apply -f - <<'EOF'apiVersion: batch/v1kind: CronJobmetadata: name: cleanup-job namespace: ckad-exercisesspec: schedule: "*/5 * * * *" successfulJobsHistoryLimit: 3 failedJobsHistoryLimit: 1 jobTemplate: spec: template: spec: containers: - name: cleanup image: busybox:1.37@sha256:bdf57e528e45e4433820e045b29b4597825a1c9e38353532d90a01445013f82e command: ['sh', '-c', 'echo "Cleanup at $(date)"'] restartPolicy: OnFailureEOF
# Validationkubectl get cronjob cleanup-job -n ckad-exercisesExercise 20: Blue-Green with Services
Target time: 5 minutes
| Context | Namespace ckad-exercises |
|---|---|
| Task | Create two Deployments app-blue (nginx:1.30.5, label version=blue) and app-green (nginx:1.30.6, label version=green), then a Service app-prod that points to blue. Switch it to green |
| Validation | After the switch, kubectl get endpointslice -l kubernetes.io/service-name=app-prod shows the IPs of the green Pods |
Solution
# Create the two versionskubectl create deploy app-blue --image=nginx:1.30.5@sha256:9bf97bd7714f5e24c1ccd545ecb9eb5435cb6d109c97cebb15e7e455e0239edb --replicas=2 -n ckad-exerciseskubectl label deploy app-blue -n ckad-exercises version=bluekubectl patch deploy app-blue -n ckad-exercises -p '{"spec":{"template":{"metadata":{"labels":{"version":"blue"}}}}}'
kubectl create deploy app-green --image=nginx:1.30.6@sha256:42c68eab6f7e22611786a9fe1d1c019e275c50185bd54b8f75dc2b9184322703 --replicas=2 -n ckad-exerciseskubectl label deploy app-green -n ckad-exercises version=greenkubectl patch deploy app-green -n ckad-exercises -p '{"spec":{"template":{"metadata":{"labels":{"version":"green"}}}}}'
# Service pointing to bluekubectl apply -f - <<'EOF'apiVersion: v1kind: Servicemetadata: name: app-prod namespace: ckad-exercisesspec: selector: version: blue ports: - port: 80EOF
# Checkkubectl get endpointslice -n ckad-exercises -l kubernetes.io/service-name=app-prod
# Switch to greenkubectl patch svc app-prod -n ckad-exercises -p '{"spec":{"selector":{"version":"green"}}}'
# Validationkubectl get endpointslice -n ckad-exercises -l kubernetes.io/service-name=app-prodCapstone: a complete delivery from a specification
The exercises above tell you what to create. The capstone does not, and that is the whole difference with the exam: it gives you six requirements to satisfy in one namespace (configuration, secret, probes, identity, exposure and isolation) without ever naming the Kubernetes object that carries each one. You choose, and you own the choice.
Allow 45 minutes. The last test holds the one success criterion that matters for a delivery: a frontend Pod reaches the shop, and a Pod that is not one does not.
Are you ready for the CKAD? The timed mock exam
Once the capstone is passed, the mock exam puts you in conditions close to the real exam: all the tasks run back to back, with no hints, and you manage the time yourself. It has 17 tasks, spread like the domains of the official CKAD curriculum.
It reproduces the mechanics of the real exam. Each task opens with a box that asks you to connect over ssh to a designated host. You do the task there, then return to the base host with exit before the next one. Nested ssh is forbidden: never connect to a second host from the first. In this lab, the base host is k8s-cp.lab, which is also a task host: kubectl, the k alias and bash completion are already configured there, as on the other hosts. The statement of each task sets the host to use: read it before you type the first command. These mechanics are described in the page Prepare for the CKAD, which gives the source.
The score is read from the final state of the cluster, never from the commands you typed. Each check, for example "the file /cache/ok exists", is a state worth 5 points. There are 20 of them, because a task worth 10% carries two. The passing threshold is 66 out of 100, that is 14 states out of 20, as in the real exam (see the Linux Foundation FAQ on the CKA, CKAD and CKS). The lab gives no hints, only the verdict, as on exam day.
The lab tool, dsoxlab, does not time the test. Plan 120 minutes in one sitting and start your own timer before the first task. The tasks are independent of one another.
This mock exam does not reproduce everything. The choice of hosts and clusters is the lab's own, and the statement of each task tells you which. In this lab, the base host is a task host, and the score, which reads the cluster state, does not check that you went through ssh: respecting the mechanics is up to you. You get neither the remote desktop nor the browser limited to the official documentation, and there is no partial credit inside a state: it is passed or it is not. Helm and image building, which the curriculum lists, are not on the menu: the course teaches them elsewhere.
Time summary
| # | Exercise | Domain | Time | Independent |
|---|---|---|---|---|
| 1 | Multi-container | Design & Build | 4 min | Yes |
| 2 | Init Container | Design & Build | 3 min | Yes |
| 3 | Deployment labels | Deployment | 4 min | Yes |
| 4 | Rolling Update/Rollback | Deployment | 3 min | No, after ex. 3 |
| 5 | HPA | Deployment | 3 min | No, after ex. 3 |
| 6 | Probes | Observability | 5 min | Yes |
| 7 | Debugging | Observability | 4 min | Yes |
| 8 | ConfigMap env | Environment | 3 min | Yes |
| 9 | Secret file | Environment | 4 min | Yes |
| 10 | Resources | Environment | 3 min | Yes |
| 11 | ServiceAccount | Environment | 4 min | Yes |
| 12 | SecurityContext | Environment | 4 min | Yes |
| 13 | PVC | Environment | 5 min | Yes |
| 14 | ClusterIP Service | Networking | 2 min | No, after ex. 3 |
| 15 | NodePort Service | Networking | 3 min | Yes |
| 16 | Ingress | Networking | 4 min | No, after ex. 15 |
| 17 | NetworkPolicy | Networking | 5 min | No, after ex. 3 and 14 |
| 18 | Job | Batch | 3 min | Yes |
| 19 | CronJob | Batch | 3 min | Yes |
| 20 | Blue-Green | Deployment | 5 min | Yes |
Total time: ~74 minutes (the 20 exercises, without the capstone or the mock exam)
The CKAD exam lasts 2 hours (120 min). If you hit the target time of each exercise with 80% success, you are ready to attempt the mock exam above.
Cleanup
Deleting the ckad-exercises namespace removes every object created during the exercises. Do it at the end of the session so that you start from a clean cluster next time.
kubectl delete ns ckad-exercisesKey takeaways
- Consistent labels: one single label (
app=api) for the Deployment, the Service and the NetworkPolicy - CPU requests are mandatory for an HPA
kubectl explainfinds the syntax quickly$do=--dry-run=client -o yamlto generate YAML files- Init containers: run sequentially before the main containers
- Probes: the startup probe goes first and suspends liveness and readiness until it has succeeded
- PVC: dynamic provisioning with the default StorageClass
- NetworkPolicy: needs a compatible CNI (not Flannel alone)
Test your knowledge
Check that you have understood the essentials of this guide. The questions only cover what has just been explained here.
Knowledge check
Check what you have learned with this interactive quiz
How it works
- The timer starts when you click Start
- Multiple choice, true/false and short answer questions
- You can move between questions
- Detailed results are shown at the end
Starts the quiz and the timer
Review
(0/0)Score by domain
A domain groups several guides and gets several questions, so its score is more reliable than a per-topic score, which often rests on a single question.
Summary
Strengths
No topic passed at 80% on at least two questions yet.
Weak areas
No topic below the pass mark.
Recommended next
Hints before you try again?
Continue the course: Prepare for the CKA: format, domains and study plan
A new full quiz with random questions
Work again only on the questions you missed