This page contains realistic, exam-style troubleshooting scenarios for the CKA, with workflows, commands, and expected fixes.
A team reports that their application pod in namespace payments keeps restarting. Your job: diagnose and fix it.
kubectl get pods -n payments
Simulated output:
NAME READY STATUS RESTARTS AGE
api-server 0/1 CrashLoopBackOff 12 5m
kubectl describe pod api-server -n payments
Look for:
Simulated event snippet:
Warning Failed Error: secret "db-password" not found
Warning BackOff Back-off restarting failed container
kubectl logs api-server -n payments
Simulated log:
FATAL: Unable to load DB password from /etc/creds/password
The pod expects a secret named db-password, but it doesnβt exist.
kubectl create secret generic db-password \
--from-literal=password=SuperSecure123 \
-n payments
kubectl delete pod api-server -n payments
kubectl get pods -n payments
kubectl logs api-server -n payments
Expected:
READY STATUS RESTARTS AGE
1/1 Running 0 10s
kubectl get nodes
Simulated:
NAME STATUS ROLES AGE VERSION
worker-1 NotReady <none> 12m v1.29.3
SSH into the node and run:
journalctl -u kubelet -f
Simulated error:
Failed to start CNI plugin: no such file or directory: /etc/cni/net.d
The CNI plugin is missing or misconfigured.
Example for Calico:
kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
Example for Weave:
kubectl apply -f https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')
kubectl get nodes
kubectl get pods -A
Expected: worker-1 becomes Ready.
kubectl get pvc -n analytics
Simulated:
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS
data Pending
kubectl describe pvc data -n analytics
Simulated:
Warning ProvisioningFailed: storageclass "fast" not found
The StorageClass referenced by the PVC does not exist.
kubectl apply -f - <<EOF
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: fast
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: WaitForFirstConsumer
EOF
kubectl get pvc -n analytics
Expected: data becomes Bound.
kubectl get pods -A to see failing workloads.kubectl describe to inspect events and configuration.kubectl logs for container-level errors.kubectl get nodes to confirm node health.kubectl get and kubectl logs.