Understanding the CKA Exam Environment & Structure
The CKA exam is a performance-based test delivered on a remote desktop browser terminal. You are given access to multiple Kubernetes clusters (e.g. k8s, main, prod) and must solve real-world problems.
Key Exam domains & Weight
1. Cluster Architecture, Installation & Configuration (25%): Focuses on bootstrapping a cluster using kubeadm, node upgrades, cluster backup/restore, and etcd snapshot maintenance.
2. Workloads & Scheduling (15%): Deployments, rolling updates, ConfigMaps, Secrets, multi-container pods, and scheduling properties.
3. Services & Networking (20%): CoreDNS verification, Service definition, Ingress configurations, and NetworkPolicy enforcement.
4. Storage (10%): PersistentVolumes (PV), PersistentVolumeClaims (PVC), storage classes, and dynamic volume provisioning.
5. Troubleshooting (30%): Repairing worker node kubelet failures, recovering from etcd outages, and resolving application runtime errors.
---
Step-by-Step CKA Simulator Labs
Scenario 1: Upgrading a Control Plane Node
You are asked to upgrade a master control plane node from version 1.28.0 to 1.29.0 using kubeadm.
Step 1: Drain the Master Node
Prevent new pods from scheduling on the node while evicting active workloads:
kubectl drain control-plane-01 --ignore-daemonsets --forceStep 2: Upgrade Kubeadm Package
Update the package repository lists and download the target version:
sudo apt-get update && sudo apt-get install -y --allow-change-held-packages kubeadm=1.29.0-1.1Step 3: Run Kubeadm Upgrade Plan & Apply
Verify the upgrade path and execute the binaries upgrade:
sudo kubeadm upgrade plan
sudo kubeadm upgrade apply v1.29.0Step 4: Upgrade Kubelet & Kubectl
Upgrade and restart the node-level agent:
sudo apt-get install -y --allow-change-held-packages kubelet=1.29.0-1.1 kubectl=1.29.0-1.1
sudo systemctl daemon-reload
sudo systemctl restart kubeletStep 5: Uncordon the Node
Mark the master node as schedulable again:
kubectl uncordon control-plane-01---
Core CKA Manifest Configurations
Persistent Volume & Claim Binding Manifests
You must configure a PersistentVolume named task-pv-volume that mounts a host path, and a corresponding PersistentVolumeClaim that requests storage from it:
apiVersion: v1
kind: PersistentVolume
metadata:
name: task-pv-volume
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 5Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/mnt/data"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: task-pv-claim
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 2GiTo test if a PVC binds successfully, run:
kubectl get pvc task-pv-claimIf the state remains Pending, check if the storageClassName and accessModes match the PV exactly.
NetworkPolicy Restriction Example
Create a NetworkPolicy that restricts incoming database access to pods carrying the label app: backend:
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: db-network-policy
namespace: default
spec:
podSelector:
matchLabels:
role: db
policyTypes:
- Ingress
ingress:
- from:
- podSelector:
matchLabels:
app: backend
ports:
- protocol: TCP
port: 5432This policy acts as an ingress firewall, blocking all external traffic targeting pods labeled role: db on port 5432, unless the connection originates from a pod labeled app: backend.