These are original practice exercises, written to match the CKA domains, not real exam questions (sharing those breaks the exam rules). Do them on your own cluster (kubeadm on two VMs, or kind/minikube for most tasks). Time yourself: aim for 5–8 minutes per task, and always verify before moving on, because the exam grades the result, not your commands.

Domain weights for context: Troubleshooting 30%, Cluster Architecture/Installation/Configuration 25%, Services & Networking 20%, Workloads & Scheduling 15%, Storage 10% (from our CKA exam guide).

Before every task in the real exam, switch to the right context. Make it a habit now: kubectl config use-context <name>.

Workloads & Scheduling

Task 1: Deployment and scale. In namespace shop, create a Deployment web with image nginx:1.27 and 3 replicas, then scale it to 5.

kubectl create namespace shop
kubectl -n shop create deployment web --image=nginx:1.27 --replicas=3
kubectl -n shop scale deployment web --replicas=5

Verify: kubectl -n shop get deploy web shows 5/5 ready.

Task 2: Schedule onto a specific node. Label node01 with disk=ssd and run a Pod fast (image busybox, command sleep 3600) that only schedules on nodes with that label.

kubectl label node node01 disk=ssd
kubectl run fast --image=busybox --dry-run=client -o yaml -- sleep 3600 > fast.yaml
# add under spec:   nodeSelector: { disk: ssd }
kubectl apply -f fast.yaml

Verify: kubectl get pod fast -o wide shows node01.

Task 3: Taints and tolerations. Taint node01 with team=infra:NoSchedule, then create a Pod infra-tool (image nginx) that tolerates it.

kubectl taint nodes node01 team=infra:NoSchedule
# in the Pod spec:
# tolerations:
# - key: team
#   operator: Equal
#   value: infra
#   effect: NoSchedule

Verify: the Pod is Running; a Pod without the toleration stays off node01. (Clean up: kubectl taint nodes node01 team=infra:NoSchedule-.)

Get Linux Foundation exam tips & real deals

Get new Linux Foundation exam guides and real LF promotions by email.

Cluster Architecture, Installation & Configuration

Task 4: RBAC. In namespace dev, let user jane get, list and watch Pods, nothing else.

kubectl create namespace dev
kubectl -n dev create role pod-reader --verb=get,list,watch --resource=pods
kubectl -n dev create rolebinding jane-pod-reader --role=pod-reader --user=jane

Verify: kubectl -n dev auth can-i list pods --as=jane → yes; kubectl -n dev auth can-i delete pods --as=jane → no.

Task 5: ServiceAccount with read access. Create ServiceAccount monitor in dev and give it cluster-wide read access to nodes.

kubectl -n dev create serviceaccount monitor
kubectl create clusterrole node-reader --verb=get,list,watch --resource=nodes
kubectl create clusterrolebinding monitor-node-reader --clusterrole=node-reader --serviceaccount=dev:monitor

Verify: kubectl auth can-i list nodes --as=system:serviceaccount:dev:monitor → yes.

Task 6: etcd backup. On the control-plane node, save an etcd snapshot to /opt/backup/etcd.db.

ETCDCTL_API=3 etcdctl snapshot save /opt/backup/etcd.db \
  --endpoints=https://127.0.0.1:2379 \
  --cacert=/etc/kubernetes/pki/etcd/ca.crt \
  --cert=/etc/kubernetes/pki/etcd/server.crt \
  --key=/etc/kubernetes/pki/etcd/server.key

Verify: the file exists and etcdutl snapshot status /opt/backup/etcd.db (or etcdctl snapshot status on older versions) prints a hash and revision. Find the certificate paths in /etc/kubernetes/manifests/etcd.yaml if yours differ.

Task 7: Node maintenance. Safely move workloads off node01 for maintenance, then bring it back.

kubectl drain node01 --ignore-daemonsets --delete-emptydir-data
# ...maintenance...
kubectl uncordon node01

Verify: during maintenance kubectl get nodes shows SchedulingDisabled; afterwards it’s Ready again. (Practise a full kubeadm upgrade of one minor version on your own cluster too; it follows the same drain → upgrade → uncordon rhythm.)

Services & Networking

Task 8: Expose a Deployment. Expose Deployment web in shop on port 80 as a NodePort Service named web-svc.

kubectl -n shop expose deployment web --name=web-svc --port=80 --type=NodePort

Verify: kubectl -n shop get svc web-svc shows a NodePort; kubectl -n shop get endpoints web-svc lists 5 Pod IPs.

Task 9: NetworkPolicy. In shop, allow traffic to Pods labelled app=web only from Pods labelled role=frontend.

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: web-from-frontend
  namespace: shop
spec:
  podSelector:
    matchLabels:
      app: web
  policyTypes: ["Ingress"]
  ingress:
  - from:
    - podSelector:
        matchLabels:
          role: frontend

Verify: from a Pod with role=frontend, wget -qO- web-svc works; from a Pod without the label it times out. (Your CNI must support NetworkPolicy.)

Storage

Task 10: PersistentVolume and claim. Create a 1Gi hostPath PV data-pv at /mnt/data, a matching PVC data-pvc in shop, and mount it in a Pod at /data. Hints: PV accessModes: [ReadWriteOnce], capacity.storage: 1Gi, hostPath.path: /mnt/data; the PVC requests 1Gi with the same access mode (and matching storageClassName, e.g. empty string, if your cluster has a default StorageClass). Verify: kubectl get pv,pvc -n shop shows Bound; a file written in /data survives a Pod restart.

Troubleshooting (30%)

Task 11: Broken Pod. A Pod api is in CrashLoopBackOff. Find out why and fix it.

kubectl describe pod api          # events, image, command, probes
kubectl logs api --previous       # output of the crashed container
kubectl get pod api -o yaml       # check env, command, volume mounts

Common causes to practise: wrong command or args, missing ConfigMap/Secret, a failing liveness probe, a wrong image tag. Verify: Pod Running with restarts no longer increasing.

Task 12: NotReady node. node01 shows NotReady. Diagnose and repair.

ssh node01
sudo systemctl status kubelet
sudo journalctl -u kubelet --since "10 min ago"
sudo systemctl enable --now kubelet   # if it was stopped or disabled

Practise by stopping kubelet yourself, breaking its config, or stopping the container runtime. Verify: kubectl get nodes shows Ready.

How to use these

  1. Do all 12 once slowly, with docs open.
  2. Reset your cluster and do them again in under 75 minutes total.
  3. Break things on purpose (task 11–12 style) until diagnosis is routine.
  4. Use both simulator sessions included with your registration under real timing.
Check the current CKA price and what’s included on the Linux Foundation site

Next steps

Plan your weeks with the CKA study guide, see what trips people up, or check whether it’s the right exam: CKA vs CKAD vs CKS. CKA is the core Mastery-stage exam on the ITRise career path.

Take Action Now

You've Read the Article. Now Take the Next Step.

Get new Linux Foundation exam guides and real LF promotions by email. Free, double opt-in, unsubscribe anytime.

New Linux Foundation exam guides
Study plans for LFCS / CKA / CKAD
Real LF promotions only
Career-stage tips

Proven strategies that land six-figure tech jobs. No spam, ever.