Skip to content
Français
Account: not signed in, sync available My learning
Select theme
Français

CKAD exercises: timed practice

By updated

Improve this page

Logo Kubernetes

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 kubectl reflexes 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:

Terminal window
# Essential aliases
alias k=kubectl
alias 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"
# Autocompletion
source <(kubectl completion bash)
complete -F __start_kubectl k
# Working namespace
kubectl create ns ckad-exercises
kn ckad-exercises

Application Design & Build (20%)

Exercise 1: multi-container Pod (sidecar)

Target time: 4 minutes

ContextNamespace ckad-exercises
TaskCreate 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
ConstraintBoth containers share an emptyDir volume mounted on /logs
Validationkubectl logs log-processor -c reader prints "Processing..."
Solution
Terminal window
kubectl apply -f - <<'EOF'
apiVersion: v1
kind: Pod
metadata:
name: log-processor
namespace: ckad-exercises
spec:
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
# Validation
kubectl logs log-processor -c reader -n ckad-exercises

Exercise 2: Init Container

Target time: 3 minutes

ContextNamespace ckad-exercises
TaskCreate 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
ConstraintemptyDir volume named config, mounted on /config (init) and /etc/app (web)
Validationkubectl exec web-init -- cat /etc/app/app.conf returns "ready=true"
Solution
Terminal window
kubectl apply -f - <<'EOF'
apiVersion: v1
kind: Pod
metadata:
name: web-init
namespace: ckad-exercises
spec:
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
# Validation
kubectl exec web-init -n ckad-exercises -- cat /etc/app/app.conf

Application Deployment (20%)

Exercise 3: Deployment with an explicit label

Target time: 4 minutes

ContextNamespace ckad-exercises
TaskCreate 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
ConstraintThe label app=api must be defined explicitly (do not rely on the label that kubectl create deploy adds on its own)
Validationkubectl get pods -l app=api shows 3 pods
Solution
Terminal window
kubectl apply -f - <<'EOF'
apiVersion: apps/v1
kind: Deployment
metadata:
name: api
namespace: ckad-exercises
spec:
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: 100m
EOF
# Validation
kubectl get pods -l app=api -n ckad-exercises

Key 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

ContextDeployment api created in exercise 3
TaskUpdate the image to nginx:1.30.6 with maxSurge=1 and maxUnavailable=0, then roll back to nginx:1.30.5
Validationkubectl get deploy api -o jsonpath='{.spec.template.spec.containers[0].image}' returns an image that starts with nginx:1.30.5
Solution
Terminal window
# Apply the strategy
kubectl patch deploy api -n ckad-exercises -p '{"spec":{"strategy":{"type":"RollingUpdate","rollingUpdate":{"maxSurge":1,"maxUnavailable":0}}}}'
# Update
kubectl set image deploy api nginx=nginx:1.30.6@sha256:42c68eab6f7e22611786a9fe1d1c019e275c50185bd54b8f75dc2b9184322703 -n ckad-exercises
kubectl rollout status deploy api -n ckad-exercises
# Rollback
kubectl rollout undo deploy api -n ckad-exercises
# Validation
kubectl get deploy api -n ckad-exercises -o jsonpath='{.spec.template.spec.containers[0].image}'

Exercise 5: Horizontal Pod Autoscaler

Target time: 3 minutes

ContextDeployment api with CPU requests defined
TaskCreate an HPA api-hpa: min 2, max 10, target CPU 70%
ConstraintRequires a working Metrics Server
Validationkubectl get hpa api-hpa shows the HPA
Solution
Terminal window
kubectl autoscale deploy api -n ckad-exercises --name=api-hpa --min=2 --max=10 --cpu=70%
# Validation
kubectl get hpa api-hpa -n ckad-exercises

Key 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

ContextNamespace ckad-exercises
TaskCreate 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)
Validationkubectl describe pod health-check shows the 3 probes configured
Solution
Terminal window
kubectl apply -f - <<'EOF'
apiVersion: v1
kind: Pod
metadata:
name: health-check
namespace: ckad-exercises
spec:
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: 2
EOF
# Validation
kubectl describe pod health-check -n ckad-exercises | grep -E "Liveness|Readiness|Startup"

Exercise 7: debugging, missing ConfigMap

Target time: 4 minutes

ContextPod broken-app does not start
TaskFind out why the Pod stays in ContainerCreating, create the missing resource, and check that the Pod starts
Validationkubectl get pod broken-app shows Running

First create the faulty Pod:

Terminal window
kubectl apply -f - <<'EOF'
apiVersion: v1
kind: Pod
metadata:
name: broken-app
namespace: ckad-exercises
spec:
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-settings
EOF
Solution
Terminal window
# Diagnosis
kubectl get pod broken-app -n ckad-exercises
kubectl 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 ConfigMap
kubectl create cm app-settings -n ckad-exercises --from-literal=settings.conf="debug=true"
# Wait for the kubelet to retry the mount
kubectl get pod broken-app -n ckad-exercises -w
# Validation
kubectl get pod broken-app -n ckad-exercises

As 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

ContextNamespace ckad-exercises
TaskCreate 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
Validationkubectl logs backend prints DB_HOST=mysql.default.svc
Solution
Terminal window
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: v1
kind: Pod
metadata:
name: backend
namespace: ckad-exercises
spec:
containers:
- name: backend
image: busybox:1.37@sha256:bdf57e528e45e4433820e045b29b4597825a1c9e38353532d90a01445013f82e
command: ['sh', '-c', 'env | grep DB_ && sleep 3600']
envFrom:
- configMapRef:
name: db-config
EOF
# Validation
kubectl logs backend -n ckad-exercises | grep DB_

Exercise 9: Secret as a file

Target time: 4 minutes

ContextNamespace ckad-exercises
TaskCreate a Secret api-creds with username=admin and token=abc123xyz, then a Pod api-client that mounts this Secret in /etc/credentials, read-only
Validationkubectl exec api-client -- cat /etc/credentials/username returns admin
Solution
Terminal window
kubectl create secret generic api-creds -n ckad-exercises \
--from-literal=username=admin \
--from-literal=token=abc123xyz
kubectl apply -f - <<'EOF'
apiVersion: v1
kind: Pod
metadata:
name: api-client
namespace: ckad-exercises
spec:
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-creds
EOF
# Validation
kubectl exec api-client -n ckad-exercises -- cat /etc/credentials/username

Exercise 10: Requests and Limits

Target time: 3 minutes

ContextNamespace ckad-exercises
TaskCreate a Pod resource-pod (nginx:1.30.6) with requests of 100m CPU / 128Mi RAM and limits of 200m CPU / 256Mi RAM
Validationkubectl describe pod resource-pod shows the configured resources
Solution
Terminal window
kubectl apply -f - <<'EOF'
apiVersion: v1
kind: Pod
metadata:
name: resource-pod
namespace: ckad-exercises
spec:
containers:
- name: nginx
image: nginx:1.30.6@sha256:42c68eab6f7e22611786a9fe1d1c019e275c50185bd54b8f75dc2b9184322703
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 200m
memory: 256Mi
EOF
# Validation
kubectl describe pod resource-pod -n ckad-exercises | grep -A4 "Limits\|Requests"

Exercise 11: ServiceAccount without an auto-mounted token

Target time: 4 minutes

ContextNamespace ckad-exercises
TaskCreate a ServiceAccount app-sa, then a Pod sa-pod (nginx:1.30.6) that uses this SA with automountServiceAccountToken: false
Validationkubectl exec sa-pod -- ls /var/run/secrets/kubernetes.io/serviceaccount fails (directory does not exist)
Solution
Terminal window
kubectl create sa app-sa -n ckad-exercises
kubectl apply -f - <<'EOF'
apiVersion: v1
kind: Pod
metadata:
name: sa-pod
namespace: ckad-exercises
spec:
serviceAccountName: app-sa
automountServiceAccountToken: false
containers:
- name: nginx
image: nginx:1.30.6@sha256:42c68eab6f7e22611786a9fe1d1c019e275c50185bd54b8f75dc2b9184322703
EOF
# Validation
kubectl 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

ContextNamespace ckad-exercises
TaskCreate a Pod secure-pod (busybox:1.37) with runAsUser 1000, runAsGroup 3000, fsGroup 2000, and readOnlyRootFilesystem true
Validationkubectl logs secure-pod prints uid=1000 gid=3000 groups=2000,3000
Solution
Terminal window
kubectl apply -f - <<'EOF'
apiVersion: v1
kind: Pod
metadata:
name: secure-pod
namespace: ckad-exercises
spec:
securityContext:
runAsUser: 1000
runAsGroup: 3000
fsGroup: 2000
containers:
- name: secure
image: busybox:1.37@sha256:bdf57e528e45e4433820e045b29b4597825a1c9e38353532d90a01445013f82e
command: ['sh', '-c', 'id && sleep 3600']
securityContext:
readOnlyRootFilesystem: true
EOF
# Validation
kubectl logs secure-pod -n ckad-exercises

Exercise 13: PersistentVolumeClaim

Target time: 5 minutes

ContextNamespace ckad-exercises
TaskCreate a PVC data-pvc (500Mi, RWO, default StorageClass), then a Pod data-pod (nginx:1.30.6) that mounts this PVC in /data
ConstraintThe StorageClass must support dynamic provisioning (standard on kind)
Validationkubectl get pvc data-pvc shows Bound
Solution
Terminal window
kubectl apply -f - <<'EOF'
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: data-pvc
namespace: ckad-exercises
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 500Mi
---
apiVersion: v1
kind: Pod
metadata:
name: data-pod
namespace: ckad-exercises
spec:
containers:
- name: nginx
image: nginx:1.30.6@sha256:42c68eab6f7e22611786a9fe1d1c019e275c50185bd54b8f75dc2b9184322703
volumeMounts:
- name: data
mountPath: /data
volumes:
- name: data
persistentVolumeClaim:
claimName: data-pvc
EOF
# Validation
kubectl get pvc data-pvc -n ckad-exercises
kubectl exec data-pod -n ckad-exercises -- df -h /data

Services & Networking (20%)

Exercise 14: ClusterIP Service

Target time: 2 minutes

ContextDeployment api with label app=api
TaskCreate a Service api-svc of type ClusterIP that exposes the Deployment on port 8080 → port 80 of the Pods
ConstraintThe selector must be app=api
Validationkubectl get endpointslice -l kubernetes.io/service-name=api-svc shows IPs
Solution
Terminal window
kubectl apply -f - <<'EOF'
apiVersion: v1
kind: Service
metadata:
name: api-svc
namespace: ckad-exercises
spec:
selector:
app: api
ports:
- port: 8080
targetPort: 80
EOF
# Validation
kubectl get svc api-svc -n ckad-exercises
kubectl get endpointslice -n ckad-exercises -l kubernetes.io/service-name=api-svc

Exercise 15: NodePort Service

Target time: 3 minutes

ContextNamespace ckad-exercises
TaskCreate a new Deployment web (2 replicas, nginx:1.30.6, label app=web) and a NodePort Service web-np on port 30080
Validationkubectl get svc web-np shows type NodePort with port 30080
Solution
Terminal window
kubectl create deploy web --image=nginx:1.30.6@sha256:42c68eab6f7e22611786a9fe1d1c019e275c50185bd54b8f75dc2b9184322703 --replicas=2 -n ckad-exercises
kubectl apply -f - <<'EOF'
apiVersion: v1
kind: Service
metadata:
name: web-np
namespace: ckad-exercises
spec:
type: NodePort
selector:
app: web
ports:
- port: 80
targetPort: 80
nodePort: 30080
EOF
# Validation
kubectl get svc web-np -n ckad-exercises

Exercise 16: Ingress

Target time: 4 minutes

ContextService web-np exposing the Deployment web
TaskCreate an Ingress web-ingress that routes web.demo.test/ to the Service web-np port 80
ConstraintUse ingressClassName: traefik
Validationkubectl get ingress web-ingress shows the Ingress created
Solution
Terminal window
kubectl apply -f - <<'EOF'
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: web-ingress
namespace: ckad-exercises
spec:
ingressClassName: traefik
rules:
- host: web.demo.test
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: web-np
port:
number: 80
EOF
# Validation
kubectl get ingress web-ingress -n ckad-exercises

Note: 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

ContextDeployment api with label app=api
TaskCreate a NetworkPolicy api-policy that allows ingress traffic on port 80 only from Pods with the label role=frontend
ConstraintThe CNI must support NetworkPolicies
Validationkubectl describe netpol api-policy shows the rule
Solution
Terminal window
kubectl apply -f - <<'EOF'
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: api-policy
namespace: ckad-exercises
spec:
podSelector:
matchLabels:
app: api
policyTypes:
- Ingress
ingress:
- from:
- podSelector:
matchLabels:
role: frontend
ports:
- protocol: TCP
port: 80
EOF
# Test
kubectl run frontend --image=busybox:1.37@sha256:bdf57e528e45e4433820e045b29b4597825a1c9e38353532d90a01445013f82e -n ckad-exercises \
--labels="role=frontend" --rm -it -- wget -qO- --timeout=2 api-svc:8080
# Validation
kubectl describe netpol api-policy -n ckad-exercises

Batch Jobs (part of Design & Build)

Exercise 18: Job with parallelism

Target time: 3 minutes

ContextNamespace ckad-exercises
TaskCreate a Job batch-job that runs 5 tasks (completions), at most 2 in parallel, image busybox:1.37, command echo "Task done" && sleep 5
Validationkubectl get job batch-job shows 5/5 completions
Solution
Terminal window
kubectl apply -f - <<'EOF'
apiVersion: batch/v1
kind: Job
metadata:
name: batch-job
namespace: ckad-exercises
spec:
completions: 5
parallelism: 2
template:
spec:
containers:
- name: worker
image: busybox:1.37@sha256:bdf57e528e45e4433820e045b29b4597825a1c9e38353532d90a01445013f82e
command: ['sh', '-c', 'echo "Task done" && sleep 5']
restartPolicy: Never
EOF
# Observe
kubectl get pods -n ckad-exercises -l job-name=batch-job -w

Exercise 19: CronJob

Target time: 3 minutes

ContextNamespace ckad-exercises
TaskCreate a CronJob cleanup-job that runs every 5 minutes, keeps 3 successful jobs and 1 failed one, command echo "Cleanup at $(date)"
Validationkubectl get cronjob cleanup-job shows the schedule */5 * * * *
Solution
Terminal window
kubectl apply -f - <<'EOF'
apiVersion: batch/v1
kind: CronJob
metadata:
name: cleanup-job
namespace: ckad-exercises
spec:
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: OnFailure
EOF
# Validation
kubectl get cronjob cleanup-job -n ckad-exercises

Exercise 20: Blue-Green with Services

Target time: 5 minutes

ContextNamespace ckad-exercises
TaskCreate 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
ValidationAfter the switch, kubectl get endpointslice -l kubernetes.io/service-name=app-prod shows the IPs of the green Pods
Solution
Terminal window
# Create the two versions
kubectl create deploy app-blue --image=nginx:1.30.5@sha256:9bf97bd7714f5e24c1ccd545ecb9eb5435cb6d109c97cebb15e7e455e0239edb --replicas=2 -n ckad-exercises
kubectl label deploy app-blue -n ckad-exercises version=blue
kubectl 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-exercises
kubectl label deploy app-green -n ckad-exercises version=green
kubectl patch deploy app-green -n ckad-exercises -p '{"spec":{"template":{"metadata":{"labels":{"version":"green"}}}}}'
# Service pointing to blue
kubectl apply -f - <<'EOF'
apiVersion: v1
kind: Service
metadata:
name: app-prod
namespace: ckad-exercises
spec:
selector:
version: blue
ports:
- port: 80
EOF
# Check
kubectl get endpointslice -n ckad-exercises -l kubernetes.io/service-name=app-prod
# Switch to green
kubectl patch svc app-prod -n ckad-exercises -p '{"spec":{"selector":{"version":"green"}}}'
# Validation
kubectl get endpointslice -n ckad-exercises -l kubernetes.io/service-name=app-prod

Capstone: 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

#ExerciseDomainTimeIndependent
1Multi-containerDesign & Build4 minYes
2Init ContainerDesign & Build3 minYes
3Deployment labelsDeployment4 minYes
4Rolling Update/RollbackDeployment3 minNo, after ex. 3
5HPADeployment3 minNo, after ex. 3
6ProbesObservability5 minYes
7DebuggingObservability4 minYes
8ConfigMap envEnvironment3 minYes
9Secret fileEnvironment4 minYes
10ResourcesEnvironment3 minYes
11ServiceAccountEnvironment4 minYes
12SecurityContextEnvironment4 minYes
13PVCEnvironment5 minYes
14ClusterIP ServiceNetworking2 minNo, after ex. 3
15NodePort ServiceNetworking3 minYes
16IngressNetworking4 minNo, after ex. 15
17NetworkPolicyNetworking5 minNo, after ex. 3 and 14
18JobBatch3 minYes
19CronJobBatch3 minYes
20Blue-GreenDeployment5 minYes

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.

Terminal window
kubectl delete ns ckad-exercises

Key takeaways

  1. Consistent labels: one single label (app=api) for the Deployment, the Service and the NetworkPolicy
  2. CPU requests are mandatory for an HPA
  3. kubectl explain finds the syntax quickly
  4. $do = --dry-run=client -o yaml to generate YAML files
  5. Init containers: run sequentially before the main containers
  6. Probes: the startup probe goes first and suspends liveness and readiness until it has succeeded
  7. PVC: dynamic provisioning with the default StorageClass
  8. 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

6 questions
6 min
70% to pass

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