0%
Kubernetes CKA and CKAD Exam Prep: Hands On Task Drills and Mock Exams
How the Exams Work
Application Developer (CKAD) Skills
Mock Exam: CKA
Exam conditions
Set a timer for 120 minutes and work in a terminal against practice clusters built with kubeadm, with only the official Kubernetes documentation open in one browser tab. No notes, no search engine and no AI tools. The mock has 17 tasks over five sections in roughly the proportions of the real exam: cluster architecture, installation and configuration about 25 percent, workloads and scheduling about 15 percent, services and networking about 20 percent, storage about 10 percent and troubleshooting about 30 percent. Each task states its weight. The tasks are original practice tasks; none is taken from the real exam.
Several tasks run on a specific node over ssh. Read the context line, switch context, and when a task says to work on a node, ssh to it, use sudo -i where root is needed, and exit when you are done. Commands typed on the wrong machine are the most expensive mistake in this exam, because the grader checks the machine the task named.
Setting up your terminal
Spend a minute on the setup you practised, then start. Aliases do not follow you through ssh, so keep the base set short enough to retype on a node if you need it:
Save every manifest to a file named after the task, such as 6.yaml. Before editing anything under /etc/kubernetes/manifests, copy the original to /root or /tmp, never to a file inside that directory, because the kubelet runs every manifest it finds there.
How grading works
Graders check end state: node versions, objects and fields, pods running, files with the right content. Multi part tasks earn partial credit, so do the parts you can. Leave objects you were not asked to touch alone and keep names exact. When a task asks for a value in a file, write only that value.
Timing checkpoint
This section is worth 25 percent. Start it around minute 2 and aim to finish by about minute 30. At a little over one minute per percent, you keep about ten minutes in reserve at the end. When a task takes twice its share, note what is left and move on; a half finished upgrade that you return to is worth more than an unstarted troubleshooting section. The upgrade and the etcd restore both involve waiting; start the wait, then read the next task.
Task 1 (8 percent): Upgrade the control plane node
Context cka-a. Control plane node cp-a, worker wk-a1.
The cluster runs Kubernetes v1.34.2, installed with kubeadm from the community package repository. Upgrade the control plane node cp-a to v1.35.1: kubeadm, the control plane components, kubelet and kubectl. Do not upgrade the worker. Keep the node schedulable when you are done.
Approach: The package repository at pkgs.k8s.io is split per minor version, so moving to a new minor means editing the repository line before apt-get update shows the new packages. Packages are usually held, so unhold and re-hold them. Drain before replacing kubelet, and uncordon at the end.
Task 2 (7 percent): Back up and restore etcd
Context cka-a. Run on cp-a.
Take a snapshot of the cluster's etcd to /opt/course/2/etcd-snap.db, using the certificates under /etc/kubernetes/pki/etcd. Then create namespace scratch as a marker. Restore the snapshot into a new data directory /var/lib/etcd-restore and make the static etcd pod use it. After the restore, scratch must no longer exist and the rest of the cluster must work.
Approach: Read the endpoint and certificate paths from /etc/kubernetes/manifests/etcd.yaml rather than typing them from memory. Restore with etcdutl snapshot restore (the etcdctl restore command is deprecated in etcd 3.5 and removed in 3.6). Change the hostPath of the data volume in the manifest, not the --data-dir flag, unless you change both consistently.
Task 3 (5 percent): Certificate based user with a namespaced role
Context cka-a, namespace dev.
Create a client certificate for user jordan in group devs by generating a key and a CertificateSigningRequest named jordan with signer kubernetes.io/kube-apiserver-client. Approve it and save the issued certificate to /opt/course/3/jordan.crt. Grant jordan permission to create, get, list, update and delete Deployments in namespace dev only. Add a kubeconfig user entry and context jordan@cka-a for the user without switching to it.
Approach: The CSR object carries the base64 encoded PEM request on one line and needs usages of client auth. After approval, the certificate is in status.certificate, also base64 encoded. Test permissions with kubectl auth can-i --as=jordan from your admin context before touching kubeconfig.
Task 4 (5 percent): Install with Helm into a dedicated namespace
Context cka-a, namespace monitoring.
A Helm repository is served at http://charts.course.local. Add it as course. Install chart course/metrics-agent version 2.4.0 as release agent in namespace monitoring (create the namespace with the install), with value resources.limits.memory=200Mi and the values file /opt/course/4/agent-values.yaml. Save the rendered manifests of the installed release to /opt/course/4/agent-manifest.yaml.
Approach: Use --version to pin the chart version and -f plus --set together: --set wins over the file for the same key. helm get manifest prints what was installed, which is different from rendering a template locally.
Reviewing this section
After the full attempt, compare each task with the expected answer in the written questions below. Count a task as complete only if every requirement holds when you check it now. For each miss, note whether the cause was knowledge, speed or care, such as the wrong node, the wrong context or a typo. Knowledge misses point to the matching lesson; care misses point to your verification habit.
The kubelet starts every file in /etc/kubernetes/manifests, so a backup copy there runs a second static pod and can break the component.
That was the last lesson. What next?
Basis Lab writes one for you from a sentence about what you want to be able to do, then teaches it and checks you understood. Your first course is free.
Build my course