arimatch1/cka-kubernetes-practice
0
☸️ CKA Kubernetes Practice Cluster
A fully browser-accessible, single-node Kubernetes cluster for CKA exam preparation. No local setup required. Click the app tab and a live terminal opens with kubectl ready.
How to Use
- Open the Space and click the "App" tab
- A browser terminal will open — Kubernetes is already running
- Type
practice-helpto see all loaded scenarios - Use
kubectl(or aliask) to complete practice tasks
Loaded Scenario Namespaces
Practice Tasks by CKA Domain
Workloads & Scheduling (15%)
- Scale
webappdeployment inpractice-deploymentsto 5 replicas - Upgrade
old-appfrom nginx:1.16 to nginx:1.21 and then rollback - Taint the node with
env=prod:NoSchedule, then create a pod with a matching toleration - Create a pod with nodeAffinity requiring label
disktype=ssd - Create a pod in
practice-podswith resource requests ofcpu:250m, memory:64Mi
Application Lifecycle Management
- Edit
api-serverdeployment to add a ConfigMap as an environment variable - Create a new Secret and mount it as a volume in a pod
- Add an initContainer to
webappthat runsecho "init done"before the main container - Create a multi-container pod with a sidecar that shares a volume with the main container
Security (from 25% cluster config domain)
- Run
kubectl auth can-i list pods --as=system:serviceaccount:practice-rbac:dev-sa - Create a pod in
practice-rbacnamespace that usesreadonly-saas its service account - Create a new Role that allows only
geton ConfigMaps and bind it toreadonly-sa - Write a NetworkPolicy in
practice-netpolthat additionally blocks all egress fromdatabase
Services & Networking (20%)
- Exec into
frontendpod and test curl tobackendservice — should succeed - Exec into
frontendpod and test curl todatabaseservice — should fail (NetworkPolicy) - Create an Ingress resource routing
/apptowebapp-svcon port 80 - Find the ClusterIP of
webapp-svcand curl it from within a busybox pod
Storage (10%)
- Create a new PVC requesting 500Mi RWO and mount it to a new pod at
/mnt/data - Write a file into the mounted path and verify it persists after pod restart
- List all PVs and identify which reclaim policy each uses
- Delete
pvc-appand observe what happens to the bound PV
Troubleshooting (30%)
- Fix every broken resource in
practice-troubleshootnamespace - Identify why
crashloop-podis failing and correct it - Find out why
pending-podwill never schedule and resolve it - Debug
broken-svcand explain why it has no endpoints - Check kubelet logs:
journalctl -u k3s -n 50 - Get all events sorted by time:
kubectl get events --sort-by=.metadata.creationTimestamp -A
Cluster Maintenance
- Backup etcd:
ETCDCTL_API=3 etcdctl snapshot save /tmp/etcd-backup.db - Drain the node (will reschedule everything):
kubectl drain <node> --ignore-daemonsets - Uncordon the node after drain
- Upgrade kubectl to a newer patch version
Limitations
- Single-node K3s cluster (no multi-node scheduling scenarios)
- No persistent storage across Space restarts
- Free tier: 2 vCPUs, 16GB RAM — sufficient for all practice scenarios
- K3s replaces full kubeadm setup but is functionally identical for CKA tasks
Resources
- Kubernetes Docs — allowed in the real CKA exam
- kubectl Cheat Sheet
- CKA Exam Curriculum
