Certified Kubernetes Administrator
CKA Study Guide
A self-contained study guide for the CKA syllabus, with operational models, command patterns, guided labs, GKE notes, glossary, index, and diagrams.
Exam scope and how to study this guide
The Certified Kubernetes Administrator exam is a performance-based, command-line exam. Candidates have 2 hours to solve 15–20 tasks, and the current public domain weights are Cluster Architecture, Installation & Configuration 25%, Workloads & Scheduling 15%, Services & Networking 20%, Storage 10%, and Troubleshooting 30%. That weighting matters: this is not a trivia exam, and the blueprint explicitly rewards practical cluster administration and break/fix capability more than passive theory.
There is one important freshness note. Linux Foundation’s marketing page still says the exam is “based on Kubernetes v1.34,” while the exam-instructions page says the current CKA environment is running Kubernetes v1.35, and LF also states that the environment is aligned to the latest Kubernetes minor release within roughly 4–8 weeks after release. In other words, you should study with current docs, but verify the exact exam version shortly before you sit for it.
The allowed resources are narrow and exam-relevant: from inside the exam environment you may use the
Kubernetes documentation, Kubernetes blog, Helm
documentation, and for CKA specifically the Gateway API documentation. You may use
search within those sites, but you must not open external search results. The CKA/CKAD environment also
preinstalls kubectl with a k alias and Bash completion, plus yq,
curl, wget, and man. This strongly shapes how you should prepare: learn
the product deeply enough to operate it, and learn the docs well enough to navigate them fast.
Use this guide in the same way the exam tests you: read a section, then perform the corresponding lab work immediately afterwards, then revisit the same material under time pressure. If you only read, your recall will be weak. If you only do labs, your mental model will stay patchy. The CKA rewards the combination of architecture understanding, YAML fluency, and fast operational diagnosis.
Exam-day playbook and environment
The CKA is a 2-hour, performance-based, remotely proctored exam of roughly 15-20 hands-on tasks solved entirely from a real terminal. The passing score is 66%, every task shows its point weight, and your registration includes one free retake. The live environment tracks recent Kubernetes minor releases closely (currently around v1.35), so always confirm the exact version on the exam instructions page the week you sit it.
The single biggest avoidable mistake: editing in the wrong cluster or namespace. Every
task can run on a different context and a different SSH host. Run the provided
kubectl config use-context line first, every time, before you touch anything.
| Topic | What you get | How to use it |
|---|---|---|
| Allowed docs | kubernetes.io/docs and /blog, Helm docs, and (CKA only) the Gateway API docs. | Search inside those sites only; never open external search results. Bookmark deep links you reuse (RBAC, PV, NetworkPolicy). |
| Preinstalled tools | kubectl with the k alias and bash completion, plus
yq, curl, wget, man, vim,
tmux. |
Lean on completion and the alias. Use yq for quick YAML edits
and man/--help when a flag escapes you. |
| Multiple clusters | Tasks span several clusters reachable via contexts; some require SSH to a node. | After SSH and sudo -i for node work, remember to exit back
before the next task. |
| Scoring | Partial credit per task; weights shown. | Bank easy, high-weight tasks first; flag and return to anything that would eat more than ~8-10 minutes. |
~6-8 minutes per task on average. If a task stalls, capture partial progress, flag it in the exam UI, and keep the clock moving. Returning fresh is faster than grinding.
Treat a task as done only after a confirming command: kubectl get, describe, a
curl from a test Pod, or rollout status. Unverified work is the silent
score-killer.
Run the exam like a buffet with a timer, not a tasting menu. Walk the line once, take the easy high-value dishes first, and don't stand frozen at the one complicated station while your plate stays empty. Points are points whether they came from an easy task or a hard one.
Cluster architecture, installation, and configuration
The cluster is an airport. The API server is the control tower that every request must talk to. etcd is the tower's written logbook of the true current state. The scheduler is the controller who decides which runway (node) each plane (Pod) parks on. The controllers are ground crews constantly nudging reality back toward the flight plan. And the kubelet on each node is the local crew chief who actually parks and watches the planes.
Kubernetes administration starts with understanding the cluster as cooperating control loops. The official components view is the right mental model: the kube-apiserver exposes the Kubernetes API, etcd is the backing store for cluster state, kube-scheduler assigns unscheduled Pods to suitable nodes, kube-controller-manager runs the built-in controllers that continuously drive actual state toward desired state, and cloud-controller-manager is optional and integrates the cluster with its underlying cloud provider. On each node, the important runtime pieces are the kubelet, the container runtime, and kube-proxy. If you do not know which component is responsible for a symptom, troubleshooting becomes guesswork.
In kubeadm-built clusters, that model becomes concrete. kubeadm init generates static
Pod manifests for the API server, controller manager, scheduler, and—unless you use external
etcd—an etcd static Pod as well. Those manifests are written to
/etc/kubernetes/manifests, and the kubelet watches that directory to start and
supervise those Pods. This is why so many CKA troubleshooting tasks eventually lead you to the manifests
directory or to kubelet logs: if a control plane component is unhealthy in a kubeadm cluster, that path is
often the truth source.
You also need to recognize the three major extension interfaces named directly in the blueprint. CRI is the interface between kubelet and container runtime, CNI plugins implement the Kubernetes network model, and CSI provides a standard way to expose storage systems to Kubernetes. These are not trivia acronyms; they are the boundaries at which real cluster problems happen. If Pods cannot get IPs, suspect the CNI path. If containers are not starting or image operations fail, suspect the CRI/runtime path. If dynamic provisioning or volume attachment fails, suspect the CSI path.
kubeadm itself is central to the current CKA blueprint. The exam covers preparing
infrastructure, creating and managing clusters with kubeadm, managing lifecycle, and implementing high
availability. Read kubeadm as a bootstrap tool: it creates the first control-plane node with
kubeadm init, and it adds new control-plane or worker nodes with kubeadm join. Join
operations rely on bootstrap tokens and TLS bootstrapping. The token is secret and allows
authenticated nodes to join the cluster; kubeadm exposes token operations through kubeadm token.
A practical kubeadm flow looks like this:
# on the first control-plane node
sudo kubeadm init --pod-network-cidr=<cidr>
# then configure kubectl access
mkdir -p $HOME/.kube
sudo cp /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
# on a joining worker or additional control-plane node
sudo kubeadm join <control-plane-endpoint>:6443 --token <token> \
--discovery-token-ca-cert-hash sha256:<hash>
Nodes stay NotReady until a CNI is installed. Right after
kubeadm init, apply exactly one network plugin, for example:
kubectl apply -f https://raw.githubusercontent.com/projectcalico/calico/v3.28.0/manifests/calico.yaml
# Cilium, Flannel, or Weave work too — any plugin that implements the cluster network.
# CoreDNS Pods leave Pending and nodes turn Ready once the CNI is up.
The moment admin.conf exists, cluster access shifts from “node shell” to “API workflow.” That is
where kubeconfig and contexts matter. A context groups together a
cluster, user, and namespace. In day-to-day use and in the
exam, you should switch context early and set the default namespace when a task is namespace-specific, because
that reduces command errors and scrolling overhead.
A small set of context commands saves time repeatedly:
kubectl config get-contexts
kubectl config use-context <context-name>
kubectl config set-context --current --namespace=<namespace>
kubectl config view --minify
High availability is a separate design skill, not just “more nodes.” The official kubeadm HA topology
guidance describes two main options: stacked control plane, where each control-plane node
also runs a local etcd member, and external etcd, where the control plane nodes and etcd
members are separated. Stacked control planes need less infrastructure; external etcd gives stronger
separation at the cost of more moving parts. In both cases you need a stable endpoint in front of the control
plane—typically a load-balanced endpoint—and when adding additional control-plane nodes, kubeadm can
temporarily upload control-plane certificates with --upload-certs and use a
--certificate-key during kubeadm join --control-plane.
Cluster lifecycle management for CKA means you should be able to perform controlled maintenance. The official
upgrade guidance is explicit: skipping minor versions is unsupported for kubeadm upgrades.
kubeadm upgrade checks cluster health, enforces version-skew policies, upgrades control-plane
static Pod manifests, updates CoreDNS and kube-proxy manifests where needed, and refreshes expiring
certificates as part of the process. During maintenance, kubectl drain safely evicts workloads
from a node, and kubectl uncordon returns the node to scheduling service when you are done. If an
application requires availability during drains, PodDisruptionBudgets are the native mechanism that constrains
voluntary disruption.
Certificate management is a distinct operational responsibility in kubeadm clusters. kubeadm-generated client
certificates expire after one year by default, and kubeadm supports manual renewal through
kubeadm certs renew. In replicated control planes, renewal must be handled across all
control-plane nodes, and the renewed files must line up with the static Pod manifests and kubeconfigs that
consume them. In practice, a surprising amount of “cluster not responding” work ends up being either expired
certificates or mismatched certificate material.
RBAC is a building's keycard system. Authentication checks that your badge is real (who you are). Authorization/RBAC checks which doors your badge opens — Roles are the doors, Bindings decide which badges get them. Admission control is the guard at the door who can still adjust or turn you away even with a valid badge.
Authorization in Kubernetes is dominated by RBAC. A Role is namespaced; a ClusterRole is cluster-scoped; a RoleBinding or ClusterRoleBinding ties subjects to those permissions. RoleBindings can reference a Role in the same namespace or a ClusterRole, but their effect remains namespaced. Service accounts fit directly into this model: create the minimum workable permissions, then bind the ServiceAccount to those permissions. This is why many exam tasks are solved with a Role + RoleBinding or ClusterRole + ClusterRoleBinding pair.
A minimal pattern looks like this:
apiVersion: v1
kind: ServiceAccount
metadata:
name: app-reader
namespace: team-a
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: pod-reader
namespace: team-a
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get","list","watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: app-reader-binding
namespace: team-a
subjects:
- kind: ServiceAccount
name: app-reader
namespace: team-a
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: pod-reader
Admission is the final gate before object persistence. Admission controllers are code in the API server that
run after authentication and authorization but before the modified object is persisted.
Several features that matter operationally depend on admission controllers being enabled. For current CKA
study, the most directly relevant built-in mechanism is Pod Security Admission, which
enforces Pod Security Standards at the namespace level using the privileged,
baseline, and restricted policy levels. Namespace labels define whether violations
are enforced, audited, or warned.
# enforce blocks; warn and audit are non-blocking signals
kubectl label ns prod \
pod-security.kubernetes.io/enforce=restricted \
pod-security.kubernetes.io/warn=restricted \
pod-security.kubernetes.io/audit=restricted
Once a namespace enforces restricted, Pods that do not set a compliant
securityContext are rejected outright. The matching Pod-level shape looks like this:
securityContext:
runAsNonRoot: true
runAsUser: 1000
allowPrivilegeEscalation: false
capabilities:
drop: ["ALL"]
seccompProfile:
type: RuntimeDefault
You also need fluency with the two package/customization systems named in the blueprint.
Helm installs charts as releases, and release history supports helm upgrade and
helm rollback. Operationally, that means you should be comfortable adding a repo, updating repo
metadata, installing a chart, inspecting release history, upgrading values, and rolling back bad revisions.
Kustomize is the built-in customization tool for layered YAML; kubectl kustomize
renders a target, and kubectl apply -k applies it. In the exam context, Helm is often the fast
way to deploy a component; Kustomize is often the fast way to produce clean environment-specific YAML without
copy/paste sprawl.
Packages templated charts as named releases with history, so
helm upgrade/helm rollback move you between revisions safely. Reach for it to
install whole components (ingress controllers, databases, operators).
Built into kubectl. A base plus per-environment overlays patch the same YAML without copies.
Reach for it to produce clean dev/prod variants of your own manifests.
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
helm install my-db bitnami/postgresql --set auth.username=app
helm list -A
helm history my-db
helm upgrade my-db bitnami/postgresql -f values.yaml
helm rollback my-db 1
helm template my-db bitnami/postgresql | less # render without installing
# overlays/prod/kustomization.yaml
resources:
- ../../base
namespace: prod
images:
- name: web
newTag: "1.28"
replicas:
- name: web
count: 5
kubectl kustomize overlays/prod # render the result to stdout
kubectl apply -k overlays/prod # build, then apply
Finally, the blueprint explicitly calls out CRDs and operators. A CustomResourceDefinition extends the Kubernetes API with a new resource type. An operator is the combination of custom resources and a controller that encodes operational knowledge for a specific system. Administratively, you need to know what it means to install a CRD-backed platform component, how to verify its controller is running, and how to inspect the custom resources it introduces. If a task asks you to “install and configure an operator,” think in terms of new API types plus a controller loop, not just “some YAML.”
# 1. CRDs register the new API types
kubectl get crds | grep -i <operator-domain>
# 2. the operator/controller Pod must actually be Running
kubectl get pods -n <operator-ns>
kubectl get deploy -n <operator-ns>
# 3. then inspect or create the custom resources it manages
kubectl api-resources --api-group=<group>
kubectl explain <customresource>.spec
kubectl get <customresource> -A
Kubeadm host-preparation runbook to add to your lab checklist
This section adds an important practical layer: before kubeadm init, each node needs
predictable memory, kernel networking, and CRI behavior. Treat this as a repeatable host-prep checklist, not
as background reading.
Run swapoff -a, then remove or comment swap entries in /etc/fstab. Kubelet
resource accounting and eviction decisions depend on predictable memory behavior.
Load overlay and br_netfilter. Persist them through
/etc/modules-load.d/k8s.conf so rebooted nodes remain Kubernetes-ready.
Set net.bridge.bridge-nf-call-iptables=1,
net.bridge.bridge-nf-call-ip6tables=1, and net.ipv4.ip_forward=1, then run
sysctl --system.
Use containerd or CRI-O, configure crictl to the correct runtime socket, then verify
runtime health before installing Kubernetes packages.
Install kubeadm, kubelet, and kubectl, then
apt-mark hold them so unattended OS updates do not accidentally violate version-skew
expectations.
Inline flags are fast, but an InitConfiguration + ClusterConfiguration file
is more reproducible and easier to review.
sudo swapoff -a
sudo sed -i.bak '/ swap / s/^/#/' /etc/fstab
cat <<'EOF' | sudo tee /etc/modules-load.d/k8s.conf
overlay
br_netfilter
EOF
sudo modprobe overlay
sudo modprobe br_netfilter
cat <<'EOF' | sudo tee /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.ipv4.ip_forward = 1
EOF
sudo sysctl --system
sudo systemctl status containerd --no-pager || sudo systemctl status crio --no-pager
sudo crictl info
HA, upgrade, and etcd recovery details worth adding
| Topic | Exam-useful operational detail | Why it matters |
|---|---|---|
| Stacked etcd HA | Each control-plane node also runs an etcd member. | Simpler and cheaper, but losing one node removes both API capacity and an etcd quorum member. |
| External etcd HA | Control-plane nodes talk to a separate etcd cluster. | Better failure-domain separation, but more infrastructure and more independent etcd operations. |
| Upgrade order | Upgrade control plane first, then workers one at a time. | Prevents kubelets or nodes from jumping ahead of supported control-plane compatibility. |
| Drain nuance | Use --ignore-daemonsets; add
--delete-emptydir-data only when you accept losing local ephemeral data. |
This is a common exam and production footgun. |
| Etcd snapshot restore | Validate snapshot status; stop API server and etcd static Pods before restoring. | Restoring while the API server writes to etcd risks inconsistent state. |
ETCDCTL_API=3 etcdctl snapshot status /opt/etcd-backup.db --write-out=table
sudo mv /etc/kubernetes/manifests/kube-apiserver.yaml /root/
sudo mv /etc/kubernetes/manifests/etcd.yaml /root/
sudo crictl ps
sudo mv /var/lib/etcd /var/lib/etcd.broken.$(date +%s)
sudo etcdutl snapshot restore /opt/etcd-backup.db --data-dir /var/lib/etcd-restore
# Then point the etcd static Pod manifest at the restored data-dir,
# move manifests back, and watch kubelet recreate the static Pods.
RBAC audit patterns and GKE identity note
Two security details are especially useful: use kubectl auth can-i as your first diagnostic
for “Forbidden” errors, and remember that subresources such as pods/exec are separate
permissions. It also explains why GKE Workload Identity Federation is safer than mounting long-lived cloud
JSON keys as Kubernetes Secrets.
A namespaced RoleBinding can reference a ClusterRole while keeping the grant localized to that namespace. This avoids duplicating common permission definitions across many namespaces.
A user can have get pods but still be blocked from kubectl exec. Check
create pods/exec or --subresource=exec.
kubectl auth can-i list pods -n monitoring
kubectl auth can-i create deployments --as=system:serviceaccount:default:my-sa
kubectl auth can-i create pods/exec -n app
kubectl auth can-i create pods --subresource=exec -n app
RBAC the fast way: imperative creation and built-in roles
On the clock you rarely hand-write RBAC YAML. Generate Roles and bindings imperatively, then prove the
grant with auth can-i --as.
kubectl create role pod-reader --verb=get,list,watch --resource=pods -n team-a
kubectl create rolebinding read-pods --role=pod-reader --user=jane -n team-a
kubectl create clusterrole node-reader --verb=get,list --resource=nodes
kubectl create clusterrolebinding read-nodes --clusterrole=node-reader --group=ops
# impersonate to confirm a grant works (or is correctly denied)
kubectl auth can-i list pods -n team-a --as=jane
kubectl auth can-i '*' '*' --as=system:serviceaccount:team-a:app-reader
| Built-in ClusterRole | What it grants |
|---|---|
| view | Read-only on most namespaced objects, but not Secrets. |
| edit | Read/write on most namespaced objects including Secrets; cannot change RBAC. |
| admin | Full control within a namespace, including RBAC, when bound by a RoleBinding. |
| cluster-admin | Unrestricted superuser across the entire cluster. |
A ClusterRole with an aggregationRule automatically absorbs the rules of any ClusterRole
carrying matching labels. This is how view/edit/admin pick up
permissions for newly installed CRDs without edits.
Reuse a built-in ClusterRole through a namespaced RoleBinding instead of authoring a fresh Role. You get least privilege with zero YAML.
Navigating the API: discovery, fields, and deprecations
Half of cluster administration is finding the right resource and field fast. These commands are your offline map of the cluster's API.
kubectl api-resources # every kind, short name, apiGroup, namespaced?
kubectl api-resources --namespaced=false
kubectl api-versions # group/versions served by this cluster
kubectl explain deployment.spec.strategy --recursive
kubectl explain pod.spec.containers.resources
# migrate a manifest off a removed apiVersion (kubectl-convert plugin)
kubectl convert -f old.yaml --output-version apps/v1 > new.yaml
Deprecation discipline: a minor-version upgrade can fully remove an old
apiVersion. Before upgrading, find manifests still using removed versions and migrate them,
or your kubectl apply will fail after the upgrade.
Workloads and scheduling
The workload portion of CKA is about choosing the right controller and then controlling how Pods behave over time. A Deployment manages stateless application Pods and provides declarative updates. A StatefulSet exists for workloads that need stable identity, stable storage, or ordered rollout and scaling. A DaemonSet ensures that all or some nodes run a copy of a Pod, which is why node-local agents such as log shippers and monitoring agents are commonly deployed that way. A Job runs work to completion, while a CronJob creates Jobs on a schedule. These distinctions are not academic; the exam often tests whether you can pick the right primitive quickly.
Stateful workloads are where networking and storage meet controller semantics. StatefulSets rely heavily on a
headless Service to provide stable DNS identities, and volumeClaimTemplates are
the normal way to give each replica its own persistent storage. If you understand that one StatefulSet Pod
equals one durable identity plus one durable claim, you will understand both why scaling works the way it does
and why simply replacing a StatefulSet with a Deployment is usually wrong.
Deployments are tested because production changes are tested. Rolling updates happen gradually by scaling
down the old ReplicaSet while scaling up the new one. You should know how to inspect rollout status, pause and
resume a rollout, examine rollout history, and roll back to a working revision. You should also understand the
meaning of maxUnavailable and maxSurge, because these fields determine how
aggressive or conservative a rollout is under failure or capacity pressure.
The fastest operational pattern is usually:
kubectl set image deploy/web web=nginx:1.27
kubectl rollout status deploy/web
kubectl rollout history deploy/web
kubectl rollout undo deploy/web
maxSurge sets how many extra Pods may exist during the roll;
maxUnavailable sets how many may be missing. Both default to 25%.
kubectl rollout undo works because the previous ReplicaSet is never deleted.
Application configuration comes through ConfigMaps and Secrets. ConfigMaps
hold non-confidential key-value configuration. Secrets carry confidential data and can be mounted as volumes
or exposed as environment variables. Pods can consume either object through env,
envFrom, or volume mounts. The most important design habit here is separation of concerns: images
should contain code, while environment-specific configuration and credentials should be externalized.
Administratively, you need to be able to create, mount, inspect, and rotate these objects.
A compact configuration pattern looks like this:
envFrom:
- configMapRef:
name: app-config
- secretRef:
name: app-secret
Probes are health check-ins for a new employee. The startup probe is the onboarding grace period — no one expects real work yet. The liveness probe is checking for a pulse: if they collapse, send them home and restart. The readiness probe is the "open for business" sign: even a healthy person isn't handed customers until they say they're ready.
Self-healing in Kubernetes is mostly not magic; it is the result of controllers plus health signals. Liveness probes tell kubelet when a container should be restarted. Readiness probes determine whether a Pod should receive traffic. Startup probes delay liveness/readiness evaluation for slow-starting applications so that kubelet does not kill them too early. Startup probes matter especially for applications with cold-start work like schema migration or large cache warm-up. If you configure probes badly, you can create your own outage.
Run to completion before app containers start, in order. Use them for one-off setup such as
waiting on a dependency, running a migration, or fetching config. The Pod stays in Init:
status until they all succeed.
Helper containers that run alongside the main one (log shippers, proxies). Modern Kubernetes models a long-running sidecar as a restartable initContainer so it starts first and stops last.
Autoscaling for CKA means primarily Horizontal Pod Autoscaler. HPA changes the replica count
of resources that expose a scale subresource, such as Deployments and StatefulSets.
kubectl top depends on the Metrics Server, and the HPA metrics pipeline also
depends on metrics collection being functional. This means the autoscaling question is never only about YAML;
it is also about whether the metrics path exists and whether the workload has sane resource requests. An HPA
without stable requests and without metrics is mostly theater.
A minimal HPA example:
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: web
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: web
minReplicas: 2
maxReplicas: 8
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 60
nodeSelector draw Pods toward matching nodes. A taint pushes Pods
away from a node unless the Pod carries a matching toleration — useful for dedicated GPU, infra, or
maintenance nodes.
A taint is a "wet paint" sign on a bench. Most people stay away automatically. A toleration is the one worker who knows it's actually dry and sits anyway. Affinity is the opposite force — a "reserved for you" sign that actively draws the right Pod to the right node.
Scheduling questions are really questions about constraints. Kubernetes can place Pods automatically, but you can steer placement through nodeSelector, node affinity, inter-pod affinity/anti-affinity, taints and tolerations, and topology spread constraints. Affinity attracts Pods toward nodes or other Pods. Taints repel Pods from nodes unless the Pods tolerate those taints. Topology spread constraints improve availability and utilization by distributing replicas across domains such as zones or hostnames. If you mix these tools carelessly, Pods become unschedulable.
Resource governance is the other half of scheduling. Requests inform scheduling;
limits enforce ceilings at runtime. LimitRange constrains what can be
specified in a namespace, while ResourceQuota caps aggregate namespace consumption and even
the count of certain object types. For cluster administrators, this is how you prevent a noisy team or a badly
templated chart from starving shared capacity. The same docs also highlight ephemeral local storage as a
tracked resource when configured appropriately, which matters because Pod logs and emptyDir usage
can contribute to node pressure.
Requests vs limits is a reserved seat vs a hard ceiling. A request is the seat the scheduler guarantees you — it reserves that much CPU/memory on a node before placing the Pod. A limit is the ceiling: exceed memory and you're OOM-killed; exceed CPU and you're simply throttled. LimitRange is the venue's per-ticket rules; ResourceQuota is the fire-marshal cap on the whole room.
Priority and preemption appear less often in beginner material but are part of real scheduling behavior. A PriorityClass gives higher-priority Pods preference when scheduling pressure exists, and Kubernetes can preempt lower-priority Pods if necessary. You do not need to become deeply theoretical here, but you do need to recognize the mechanism and inspect it quickly if a workload is evicting or displacing others.
Scheduling constraints and namespace governance details
A useful way to remember scheduling constraints is the “attraction versus repulsion” model: affinity attracts Pods to suitable nodes, while taints repel Pods unless a matching toleration exists.
| Mechanism | Hard/soft behavior | Use it when |
|---|---|---|
| requiredDuringSchedulingIgnoredDuringExecution | Hard node-affinity rule. If no node matches, the Pod stays Pending. | GPU, SSD, architecture, compliance-zone, or strict node-pool placement. |
| preferredDuringSchedulingIgnoredDuringExecution | Soft preference. Scheduler tries, but can fall back. | Performance preference without sacrificing availability. |
| NoSchedule taint | Blocks new non-tolerating Pods. | Dedicated nodes such as infra, GPU, database, or maintenance pools. |
| PreferNoSchedule taint | Soft repellant. | Prefer isolation, but allow fallback under pressure. |
| NoExecute taint | Blocks new Pods and evicts existing non-tolerating Pods. | Failure isolation or quick removal from unhealthy nodes. |
Exam nuance: tolerationSeconds only matters with NoExecute. It
controls how long an already-running Pod may remain bound to a tainted node before eviction.
Sets the aggregate namespace budget: total requests, limits, object counts, PVCs, Pods, and similar caps.
Controls individual Pod/container defaults, minimums, and maximums. It can inject default requests/limits so quota-controlled namespaces remain usable.
apiVersion: v1
kind: ResourceQuota
metadata:
name: compute-resources
namespace: dev-environment
spec:
hard:
requests.cpu: "4"
requests.memory: 8Gi
limits.cpu: "8"
limits.memory: 16Gi
pods: "20"
---
apiVersion: v1
kind: LimitRange
metadata:
name: container-defaults
namespace: dev-environment
spec:
limits:
- type: Container
defaultRequest:
cpu: 100m
memory: 128Mi
default:
cpu: 500m
memory: 512Mi
How the scheduler places Pods (and how to place them by hand)
Pending Pod almost always means filtering eliminated
every node.
Scheduling is matchmaking. First rule out everyone incompatible (wrong location, already full, allergic to your taint), then rank the remaining candidates and pick the best fit. If nobody survives the first round, there is simply no match — the Pod waits.
Set spec.nodeName to bind a Pod to a node directly, bypassing the scheduler entirely.
Useful when the scheduler is down or for a one-off placement.
A static Pod is run by one node's kubelet from /etc/kubernetes/manifests
(no API scheduler) and is named with the node suffix. A DaemonSet is the API-driven way
to run one Pod per node.
# bind without the scheduler
spec:
nodeName: node01
# or ask a specific scheduler to place this Pod
spec:
schedulerName: my-custom-scheduler
# which scheduler actually bound the Pod?
kubectl get events -o wide | grep Scheduled
A cluster can run more than one scheduler at once (each as its own Deployment with a distinct
--leader-elect-resource-name and name); a Pod opts in via schedulerName. Newer
clusters instead express this with scheduler profiles inside a single scheduler.
Deployment strategies and safe rollouts
| Strategy | Behaviour | Trade-off |
|---|---|---|
| Recreate | Kill all old Pods, then start new ones. | Brief downtime; simplest; needed when two versions can't coexist. |
| RollingUpdate | Gradually replace old with new (default). | Zero-downtime; both versions run briefly. Tuned by
maxSurge/maxUnavailable. |
| Blue-green | Stand up v2 fully, switch the Service. | Instant cut-over and rollback; needs double the capacity. |
| Canary | Send a small share to v2 first. | Limits blast radius; needs label/replica or mesh control. |
spec:
strategy:
type: RollingUpdate # or Recreate
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
---
kubectl rollout status deploy/web
kubectl rollout pause deploy/web # batch several edits into one rollout
kubectl rollout resume deploy/web
kubectl rollout history deploy/web
kubectl rollout undo deploy/web --to-revision=2
Blue-green is two identical stages with one spotlight. The band on the blue stage is playing; the green stage is set up and soundchecked in the dark. Cutting over is just moving the spotlight — and if the new set flops, you move it straight back.
ConfigMaps and Secrets in depth
Three ways to consume config, three flavours of Secret, and one safety switch.
# whole objects as env vars
envFrom:
- configMapRef: {name: app-config}
- secretRef: {name: app-secret}
# a single key as one env var
env:
- name: DB_PW
valueFrom:
secretKeyRef: {name: app-secret, key: password}
# or mounted as files
volumes:
- name: cfg
configMap: {name: app-config}
| Secret type | Use |
|---|---|
| generic / Opaque | Arbitrary key-value secrets (passwords, tokens).
kubectl create secret generic ... |
| docker-registry | Private-registry credentials referenced by imagePullSecrets. |
| tls | A cert/key pair for Ingress or webhook TLS. |
kubectl create secret docker-registry regcred \
--docker-server=registry.example.com --docker-username=u --docker-password=p
kubectl create secret tls web-tls --cert=tls.crt --key=tls.key
# imperative HPA in one line
kubectl autoscale deploy/web --min=2 --max=8 --cpu-percent=60
Immutability: setting immutable: true on a ConfigMap or Secret blocks
further edits. It protects against accidental change and reduces API-server load, but to change the value
you must delete and recreate the object (and restart consumers).
Services and networking
A Service is Kubernetes’ stable way to expose a network application that runs across one or more Pods. The main service types you must know cold are ClusterIP, NodePort, and LoadBalancer. Under the hood, modern Kubernetes uses EndpointSlices to represent backend endpoints for Services at scale, and kube-proxy watches both Services and EndpointSlices to program the data plane for virtual IP behavior. If a Service exists but traffic still does not flow, your mind should immediately jump to selectors, ports, targetPorts, EndpointSlices, and kube-proxy—not only to the Pod itself.
A Service is a reception desk with a permanent phone number. Staff (Pods) come and go, get hired and fired, change desks — but callers always dial the same number and reception routes them to whoever is on duty. A headless Service is skipping reception and getting every employee's direct line instead.
A headless Service is a special but important variant. Setting .spec.clusterIP: None removes the
virtual IP and the kube-proxy load-balancing behavior. DNS then returns Pod IPs directly, which is why
headless Services pair naturally with StatefulSets and other direct-discovery patterns. Headless Services are
not just “another service type”; they deliberately change the discovery model from virtual IP routing to
endpoint-level discovery.
Kubernetes service discovery relies on cluster DNS. kubeadm installs CoreDNS by default, and
the DNS add-on publishes Service names and records for Pods and headless Services according to the cluster DNS
rules. Operationally, you should know where CoreDNS lives, that it is usually in kube-system, and
that failures can come from CoreDNS itself, its RBAC permissions, bad Corefile configuration, or
upstream network issues. A classic troubleshooting pattern is “Pod is healthy, Service exists, but name
resolution fails”—that is a DNS path, not an application path.
For north-south HTTP ingress, you still need strong Ingress fundamentals. An Ingress can
expose Services via externally reachable URLs, load balance traffic, terminate TLS, and do host/path-based
routing. But the resource alone does nothing without an Ingress controller, and modern
practice is to specify ingressClassName so the intended controller knows it should implement that
Ingress. In multi-controller clusters, forgetting the class is an easy way to create a “correct-looking,
non-working” resource.
The CKA blueprint now also includes the Gateway API, and this is one of the most important “newer” areas to treat seriously. The Kubernetes docs describe Gateway API as an add-on family of API kinds for advanced traffic routing, and the Gateway API project describes it as the next generation of Kubernetes ingress-style traffic management. Conceptually, the common path is: a GatewayClass defines a class of gateways provided by a controller, a Gateway defines listeners and addresses, and an HTTPRoute attaches routing rules that forward traffic to Services. The fact that Gateway API is an add-on matters: you need the controller and the CRDs installed, not just the YAML.
A stripped-down Gateway API example looks like this:
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: web-gw
spec:
gatewayClassName: example
listeners:
- name: http
protocol: HTTP
port: 80
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: web-route
spec:
parentRefs:
- name: web-gw
rules:
- backendRefs:
- name: web-svc
port: 80
NetworkPolicy is the layer where connectivity becomes an explicit security boundary. NetworkPolicies let you define allowed traffic flows at OSI Layer 3 and 4 for Pods, but they only work if the cluster’s network plugin supports policy enforcement. The key mindset is “default allow until policy selects a Pod, then allow only what is explicitly permitted.” Administrators often fail here by assuming a policy is broken when the real issue is that the CNI plugin does not implement policy or the selected Pods were not the ones they thought they were selecting.
A minimal ingress-allow policy:
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-from-frontend
namespace: app
spec:
podSelector:
matchLabels:
role: backend
policyTypes: ["Ingress"]
ingress:
- from:
- podSelector:
matchLabels:
role: frontend
ports:
- protocol: TCP
port: 8080
namespaceSelector and podSelector are two list entries
(OR) or one combined entry (AND) completely changes what traffic is allowed. This is one of the most common
"my policy looks right but blocks everything" bugs.
NetworkPolicy logic, Ingress vs Gateway API, and GKE networking
A key networking detail is the YAML selector logic for NetworkPolicy. Policies are additive: once a Pod is selected by any policy, allowed traffic is the union of matching allow rules. The subtle part is whether selectors are separate list items or part of the same list item.
Separate - list entries mean “traffic from this namespace OR traffic from these Pods”.
namespaceSelector and podSelector under the same - mean “Pods
with this label inside namespaces with this label”.
ingress:
- from:
- namespaceSelector:
matchLabels:
team: payments
podSelector:
matchLabels:
app: api
| Area | Ingress | Gateway API |
|---|---|---|
| Main role | HTTP/HTTPS exposure through an Ingress controller. | Role-oriented traffic APIs: GatewayClass, Gateway, HTTPRoute, and other route types. |
| Advanced behavior | Often pushed into controller-specific annotations. | More behavior is represented as portable API fields, including route attachment and traffic splitting where supported. |
| Protocol scope | Primarily Layer 7 HTTP/HTTPS. | Designed to cover both L7 and L4 route families through distinct route resources. |
| CKA angle | Know resources, controller requirement, class, TLS, host/path routing. | Know GatewayClass → Gateway → Route → Service relationship and that CRDs/controllers must exist. |
GKE networking model to understand conceptually
GKE’s VPC-native model uses Alias IP ranges so Pod IPs come from secondary subnet ranges known to the VPC. This contrasts with older route-based clusters, where GKE had to program custom VPC routes for node Pod CIDRs. VPC-native clusters also enable container-native load balancing with Network Endpoint Groups, where the Google Cloud load balancer can target Pod endpoints more directly instead of always sending traffic to a node first.
The cluster networking model and kube-proxy
Pods live in one big city where every building has a unique street address (its IP), and
anyone can walk directly to any address. A Service IP is not a building at all — it's a forwarding number
that kube-proxy quietly redirects to whichever building is currently on duty.
| kube-proxy mode | How it routes |
|---|---|
| iptables | Default; programs iptables rules and picks a backend at random. Simple, fine for most clusters. |
| IPVS | Kernel load-balancer with real algorithms (rr, lc, etc.); scales better with thousands of Services. |
Cluster DNS: names, records, and the Corefile
web.prod.svc.cluster.local
web); across namespaces use
web.prod or the full FQDN. A headless Service returns Pod IPs directly and exposes per-Pod
SRV/A records. Pod A-records use dashes and pod instead of svc:
10-244-1-5.prod.pod.cluster.local.
Cluster DNS is a structured company directory: person.department.company.com. From inside your own department you just say a first name; from another floor you add the department; from outside you spell out the whole thing.
CoreDNS runs in kube-system and is configured by the Corefile, stored in the
coredns ConfigMap. The kubernetes plugin serves cluster records and
forward . /etc/resolv.conf sends everything else upstream.
kubectl get configmap coredns -n kube-system -o yaml # the Corefile
kubectl get svc kube-dns -n kube-system # the DNS service IP
kubectl run t --rm -it --image=busybox:1.36 --restart=Never -- \
nslookup web.prod.svc.cluster.local
Ingress details and NetworkPolicy egress
Names which controller implements the Ingress. Omit it in a multi-controller cluster and the rule silently does nothing.
Prefix matches by path segments; Exact matches the whole path.
Controller-specific rewrites (the rewrite-target annotation) are not portable.
spec:
ingressClassName: nginx
rules:
- host: shop.example.com
http:
paths:
- path: /api
pathType: Prefix
backend:
service:
name: api-svc
port: {number: 80}
NetworkPolicies are additive and namespaced. A common production baseline is a default-deny policy, then explicit allows on top — but remember egress deny also blocks DNS, so you must re-allow port 53.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny-all
namespace: app
spec:
podSelector: {}
policyTypes: ["Ingress","Egress"]
---
# then allow DNS so Pods can still resolve names
egress:
- to:
- namespaceSelector:
matchLabels: {kubernetes.io/metadata.name: kube-system}
ports:
- {protocol: UDP, port: 53}
- {protocol: TCP, port: 53}
Storage
Storage is its own weighted CKA domain (10%), so it gets its own section here. It is mostly about durable lifecycle, provisioning behavior, and claims matching. A PersistentVolume is storage that exists as a cluster resource, either provisioned manually or dynamically. A PersistentVolumeClaim is a user request for storage. A StorageClass describes a class of storage and supplies the parameters used for dynamic provisioning. Dynamic provisioning creates storage on demand when a claim asks for a StorageClass; without it, administrators must pre-provision PVs. This PV/PVC/StorageClass triad is foundational for nearly every stateful workload pattern in Kubernetes.
Claims request size and access modes such as ReadWriteOnce,
ReadOnlyMany, ReadWriteMany, and ReadWriteOncePod. Access modes are
used for matching claims and volumes, and in some cases they also constrain mount behavior. Reclaim policy
then decides what happens when the claim is released. For dynamically provisioned volumes, the default reclaim
policy is often Delete, but Retain is frequently the safer choice for
valuable data because it preserves the underlying volume for manual recovery after claim deletion.
A minimal StorageClass and PVC pair:
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: fast
provisioner: <csi-provisioner-name>
reclaimPolicy: Retain
volumeBindingMode: WaitForFirstConsumer
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: data
spec:
accessModes:
- ReadWriteOnce
storageClassName: fast
resources:
requests:
storage: 5Gi
volumeBindingMode: WaitForFirstConsumer delays provisioning until a Pod is scheduled so zonal
storage lands in the right zone. The reclaim policy decides the volume's fate after the claim is
gone.
Storage is renting an apartment. The PVC is your rental application ("2 bedrooms, 5Gi, can-write-once"). The PV is the actual apartment you're matched to. The StorageClass is the rental agency that can build a new unit on demand (dynamic provisioning). Reclaim policy is the move-out clause: Retain keeps the apartment and your furniture for later; Delete demolishes it the moment you hand back the keys.
Do not ignore ephemeral storage just because the exam has a separate persistent-storage domain. Kubernetes
supports several forms of ephemeral volumes, including emptyDir,
configMap, secret, downwardAPI, image volumes, and CSI ephemeral
volumes. Nodes also have local ephemeral storage used for writable layers,
emptyDir, logs, and related scratch data. This matters operationally because some node-pressure
situations are not memory problems or PV problems—they are ephemeral storage problems.
The connection back to StatefulSets is worth making explicit one more time: when a workload needs stable network identity and persistent storage, StatefulSet plus a headless Service plus per-Pod claims is the canonical pattern. That pattern appears again and again across databases, message queues, and clustered systems, so it is worth practicing until it feels boring.
Local storage and CSI nuances from the expanded reference set
The storage section is now expanded with two production-relevant details: local node storage must be pinned to the node that actually owns the data, and cloud CSI drivers often expose provider-specific parameters through StorageClass fields.
Fast and simple, but the data stays on one node. Use node affinity so Pods using that PV schedule onto the node that has the disk path.
Delays provisioning until a Pod is scheduled, helping the provisioner create zonal storage in the same zone as the selected node.
apiVersion: v1
kind: PersistentVolume
metadata:
name: local-harddrive-pv
spec:
capacity:
storage: 50Gi
volumeMode: Filesystem
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
storageClassName: local-storage
hostPath:
path: /mnt/data
nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- worker-node-01
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: pd-balanced-xfs
provisioner: pd.csi.storage.gke.io
parameters:
type: pd-balanced
csi.storage.k8s.io/fstype: xfs
reclaimPolicy: Retain
volumeBindingMode: WaitForFirstConsumer
Volume types you should recognize instantly
Scratch space created with the Pod and deleted with it. Great for caches and for sharing files between containers in the same Pod.
Mounts a path from the node's filesystem. Powerful but ties the Pod to one node and is a security risk — avoid for app data.
volumes:
- name: scratch
emptyDir: {}
- name: hostlogs
hostPath:
path: /var/log
type: Directory
volumeMounts:
- name: cfg
mountPath: /etc/app/config.yaml
subPath: config.yaml # mount one file, not the whole dir
volumeMode: Filesystem (default) mounts a formatted, mounted directory;
Block hands the raw block device to the container for databases that manage their own storage
layout.
Troubleshooting and operational discipline
kubectl get nodeskubectl describe pod
kubectl logs -pkubectl get endpointslicesjournalctl -u kubeletTroubleshoot like an ER, not a hobby mechanic. Stabilize the patient before diagnosing the rash: confirm the cluster and node are alive before blaming the application. And change one thing at a time — a clean partial fix that restores service beats a clever change that breaks three more components.
Common broken states: symptom to first checks
A compact lookup for "during-exam panic" moments. Match the symptom, then walk its checks in order.
| Symptom | First checks, in order |
|---|---|
| ImagePullBackOff | Image name/tag, registry pull secret, node DNS, node egress. |
| CrashLoopBackOff | logs --previous, command/args, mounted config, secret mount. |
| Pending | Requests too high, taints, nodeSelector/affinity, unbound PVC. |
| Service has no traffic | Selector, targetPort, EndpointSlice, NetworkPolicy, CoreDNS. |
| NodeNotReady | kubelet, container runtime, CNI, certs, disk pressure. |
| API server down | Static Pod manifest, cert paths, etcd health, kubelet logs. |
Exam quick-check
Before marking any task done, run the highest-frequency checks. Wrong context, wrong namespace, and unverified output lose the most points.
| Check | Fast command or question | Why it matters |
|---|---|---|
| Context | kubectl config current-context |
Wrong cluster is the easiest way to lose points fast. |
| Namespace | kubectl config view --minify -o jsonpath='{..namespace}' |
A correct object in the wrong namespace is still wrong. |
| Object exists | kubectl get ... |
Do not trust an apply message alone. |
| Workload healthy | kubectl describe ..., kubectl rollout status ... |
Events and rollout state reveal probe/image/scheduling failures early. |
| Service path | kubectl get svc,endpointslice |
Service issues are usually selector or port issues. |
| DNS works | nslookup kubernetes.default.svc.cluster.local from a Pod |
Fastest truth check for cluster DNS. |
| Node health | kubectl get nodes |
The official troubleshooting flow starts here. |
| Logs checked | kubectl logs ..., kubectl logs -p ... |
Current and previous logs solve most workload failures. |
| Metrics path | kubectl top nodes |
If this fails, HPA assumptions may also be wrong. |
| Time control | Am I stuck past ~8-10 minutes? | Bank easy points first; partial progress beats thrashing. |
Want to drill these live? Open the hands-on task bank.
Troubleshooting has the highest exam weight for a reason: Kubernetes administration is mostly controlled
diagnosis under uncertainty. Your first-pass triage should always answer three questions in order: Is
the cluster healthy? Is the workload healthy? Is the traffic path healthy? The official
cluster-troubleshooting guide starts with kubectl get nodes and recommends verifying nodes are
present and Ready; it also points to kubectl cluster-info dump for deeper health
inspection. That order is useful because it prevents wasting time debugging an application symptom caused by a
dead node or damaged control plane.
For workload-level triage, the basic loop is still unbeatable: kubectl get,
kubectl describe, kubectl logs, and object-specific status inspection. The Pod
debugging guidance explicitly recommends kubectl describe pod as an early step for details, and
kubectl logs is the standard way to inspect container output streams—including previous crashed
container instances with -p where appropriate. Many exam tasks look hard only until you inspect
the right description or the right container log.
When the problem moves below the Pod layer, switch tools. On Linux nodes using systemd, the
kubelet and container runtime write to journald by default, so
journalctl -u kubelet is a core node-admin command. For CRI-compatible runtimes,
crictl is the standard inspection tool to debug runtime state on the node. Use
it when Kubernetes objects look normal but containers are still not behaving normally on disk or in the
runtime.
For deeper node or Pod introspection, modern Kubernetes also supports
kubectl debug and ephemeral containers.
kubectl debug can create a debugging environment for a node or Pod, and ephemeral containers are
explicitly designed for troubleshooting existing Pods rather than for normal application design. These are
especially useful when the original image lacks tooling like sh, nslookup, or
curl.
Service and networking failures should be debugged as a chain. If a Service is not working, verify that the
backing Pods exist, that labels match the Service selector, that the Service port and targetPort align with
the container port, and that EndpointSlices exist and contain the expected backends. If traffic still fails,
inspect kube-proxy behavior, any active NetworkPolicies, and DNS if the symptom is name resolution. The
official DNS debugging docs also note that CoreDNS needs permission to list Service and EndpointSlice-related
resources, which means a pure “networking” symptom can actually be an RBAC symptom in
kube-system.
Resource-usage troubleshooting depends on the metrics pipeline. kubectl top shows recent CPU and
memory usage for nodes and Pods, but it only works when Metrics Server is installed and functioning. That same
metrics pipeline is what the HPA depends on. So when kubectl top is empty or broken, think one
layer down: kubelet metrics path, Metrics Server health, and cluster permissions.
For CKA, etcd backup and restore is the archetypal disaster-recovery skill. The Kubernetes docs are direct: all Kubernetes objects are stored in etcd, snapshots are important for recovery, and snapshot files contain the full cluster state and sensitive data, so they should be kept safe. In a kubeadm control plane, the fastest operational technique is usually to inspect the etcd static Pod manifest to discover the data directory, endpoints, and certificate paths, then use those values in your snapshot commands rather than guessing them.
The current etcd guidance supports snapshot restore from the same major.minor family and also across patch
versions, and Kubernetes documentation now points operators toward etcdutl for
restore while still documenting etcdctl as a deprecated option. A live snapshot
can be taken with etcdctl snapshot save; a restore creates new etcd data directories and,
importantly, a new logical cluster identity. That is why restore work is not just “copy files back”: you have
to understand the member identity and data directory consequences.
A practical exam-safe backup pattern typically looks like this:
export ETCDCTL_API=3
# discover certs/endpoints from /etc/kubernetes/manifests/etcd.yaml first
etcdctl \
--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 \
snapshot save /opt/etcd-snapshot.db
# restore with etcdutl or etcdctl depending what is available and expected
etcdutl snapshot restore /opt/etcd-snapshot.db --data-dir /var/lib/etcd-restore
Control-plane troubleshooting in kubeadm clusters often loops back to static Pod manifests.
If the API server, controller manager, scheduler, or etcd is failing, inspect
/etc/kubernetes/manifests, compare image tags, commands, flags, volumes, and certificate mounts,
and then correlate those findings with kubelet logs. The kubeadm reconfiguration docs make this explicit:
changes to control-plane component configuration eventually have to be reflected in those manifest files.
The administrator’s discipline here is simple but hard: do not thrash. Change one thing at a time, verify immediately, and leave behind a working state. In the CKA, a clean partial fix that restores availability is better than a clever but unverified surgery that breaks three more components. That is not only exam advice; it is production advice.
NodeNotReady and CoreDNS troubleshooting runbook
A useful troubleshooting improvement is symptom-to-layer mapping. Start from Kubernetes status, then drop to the node only when the API-level clues point there.
| Node condition | Meaning | Likely next commands |
|---|---|---|
| MemoryPressure | Node memory is constrained and eviction/OOM behavior may follow. | kubectl describe node, free -h, workload
requests/limits review |
| DiskPressure | Local disk under kubelet/runtime paths is constrained; image pulls, logs, and ephemeral storage may fail. | df -h,
du -sh /var/lib/kubelet /var/lib/containerd |
| PIDPressure | The host is close to process-ID exhaustion. | ps, systemctl status kubelet, inspect
runaway workloads |
| Ready=False/Unknown | Kubelet cannot report healthy status to the API server. | journalctl -u kubelet, runtime status, certificates,
CNI config |
kubectl get nodes -o wide
kubectl describe node <node-name>
ssh <node>
sudo systemctl status kubelet --no-pager
sudo journalctl -u kubelet -n 80 --no-pager
sudo crictl info
sudo ls -la /etc/cni/net.d
CoreDNS and DNSPolicy checks
Default for normal Pods. Internal Service names go to CoreDNS first.
Pod inherits node DNS config. Internal .svc.cluster.local names may not resolve.
Use for hostNetwork: true Pods that still need cluster DNS.
kubectl get pods -n kube-system -l k8s-app=kube-dns
kubectl logs -n kube-system -l k8s-app=kube-dns
kubectl get svc kube-dns -n kube-system
kubectl get endpoints kube-dns -n kube-system
kubectl run dns-test --rm -it --image=busybox:1.36 --restart=Never -- nslookup kubernetes.default.svc.cluster.local
Reading logs like a pro
Troubleshooting is the largest exam domain, and most of it starts with logs. Know these flags cold.
kubectl logs my-pod # single-container Pod
kubectl logs my-pod -c sidecar # choose a container in a multi-container Pod
kubectl logs my-pod --previous # logs from the *crashed* previous instance
kubectl logs -f my-pod --since=10m --tail=100
kubectl logs -l app=web --prefix # stream all Pods matching a label
# node-level, when the API can't help
journalctl -u kubelet -f # kubelet on a node
crictl ps -a ; crictl logs <container-id> # container runtime directly
ls /var/log/pods ; ls /var/log/containers # on-node log files
The single most useful flag is --previous. For a
CrashLoopBackOff the current container may be too short-lived to inspect;
--previous shows why the last one died.
Structured failure playbooks
When the decision tree points you at a layer, run the matching checklist top-to-bottom.
| Application failure | Command |
|---|---|
| 1. Pod status & reason | kubectl get pods -o wide (CrashLoopBackOff / ImagePullBackOff /
Pending) |
| 2. Events & spec | kubectl describe pod <p> |
| 3. Logs | kubectl logs <p> --previous |
| 4. Service wiring | kubectl get endpoints <svc> — empty means selector mismatch
|
| 5. Connectivity/DNS | kubectl exec + nslookup/wget |
| Control-plane failure | Command |
|---|---|
| 1. Components up? | kubectl get pods -n kube-system |
| 2. Static-pod manifests | inspect /etc/kubernetes/manifests/*.yaml on the control node |
| 3. kubelet on control node | systemctl status kubelet · journalctl -u kubelet |
| 4. Component logs | crictl logs <id> or /var/log/pods |
| 5. etcd health | etcdctl endpoint health (with certs) |
| Worker-node NotReady | Command |
|---|---|
| 1. Node conditions | kubectl describe node <n> (MemoryPressure, DiskPressure,
Ready) |
| 2. kubelet service | SSH in · systemctl status kubelet ·
journalctl -u kubelet |
| 3. Container runtime | systemctl status containerd · crictl ps |
| 4. kubelet config/certs | check /etc/kubernetes/kubelet.conf, /var/lib/kubelet
|
| 5. Restart & verify | systemctl restart kubelet → kubectl get nodes |
Hands-on task bank
Reading builds the mental model; a live terminal builds the speed. The companion task bank holds 50 timed, exam-style tasks with deterministic verification, weighted to the official domains and ordered from foundations to failure drills.
Each task gives a context, an objective, minimal hints, a verify command with expected output, and a reveal-on-demand solution. A per-task timer keeps you honest.
Most tasks run in an API lab (kind/minikube with an add-on bundle). Node and control-plane tasks use a kubeadm VM lab. Each task launches the right environment.
Guided practice framework and GKE notes
kubeadm lab
You operate the control plane, static Pod manifests, kubelet, certificates, etcd, CNI, and node lifecycle. This is essential for CKA bootstrap and break/fix work.
GKE Standard
Google manages the control plane and system components; you manage node pools and Kubernetes workloads. Useful for cloud workload, networking, and autoscaling practice.
GKE Autopilot
Google manages the control plane, nodes, and system components. Useful for seeing managed guardrails, but not a replacement for kubeadm control-plane practice.
For full CKA preparation, a real kubeadm lab is not optional. The blueprint explicitly includes creating and managing clusters with kubeadm, lifecycle operations, high-availability control planes, and operator installation. That alone means you need at least one environment where you control the nodes, the manifests, the certificates, and etcd. A managed cluster can help with some domains, but it cannot substitute for kubeadm where the objectives themselves are kubeadm-specific.
A good study framework is to progress through the same operational maturity curve that a real platform team would follow:
- Bootstrap lab: build a single-control-plane kubeadm cluster from clean Linux hosts; configure kubeconfig access; install a CNI plugin; verify node readiness and CoreDNS. Success means you can rebuild this from memory without copy/paste dependence.
- Node access lab: practice context switching, namespace defaults, token generation, and joining worker nodes. Success means you can move between clusters and namespaces without accidental changes in the wrong place.
- HA lab: add additional control-plane nodes using a load-balanced endpoint, compare stacked vs external etcd tradeoffs, and verify control-plane health after node loss. Success means you can explain what is running where and why.
- Lifecycle lab: drain, upgrade, uncordon, renew certificates, and verify version-skew safety. Success means upgrades feel procedural rather than stressful.
- Workload lab: deploy a stateless app, perform a rolling update, break readiness on purpose, roll back, add HPA, and externalize config with ConfigMaps and Secrets. Success means you can move from deploy to diagnose to recover in one loop.
- Networking lab: create ClusterIP, NodePort, Ingress, Gateway, and NetworkPolicy resources; then deliberately break selectors, DNS, or routes and fix them. Success means you stop treating “network issue” as a vague category.
- Storage lab: create StorageClasses, PVCs, StatefulSets, and reclaim-policy variations; then test what happens when claims are deleted or Pods are rescheduled. Success means you can predict storage behavior before you apply.
- Break/fix lab: back up etcd, restore etcd, damage control-plane manifests, break kubelet config, and recover. Success means the Troubleshooting domain becomes mechanical instead of emotional.
Once you can do those calmly, shift into timed drills. Rehearse the actual exam style: read the whole task once, identify the target host and namespace immediately, switch context before editing, verify outputs before moving on, and use official docs instead of memory when syntax is uncertain. That matches the LF environment design: tasks are completed on designated SSH hosts, and the exam environment expects you to use the available tools and allowed documentation rather than perfect recall.
Because you asked about “GoogleKE,” the managed-Kubernetes notes here use the current product name: Google Kubernetes Engine, or GKE. GKE is useful as a study supplement, but you should understand what it manages for you. In GKE Standard, Google manages the control plane and system components while you manage the nodes. In GKE Autopilot, Google manages the control plane, nodes, and system components. That difference is the whole reason GKE is useful for some CKA domains and weak for others.
GKE also adds platform-specific identity and policy behavior. Workload Identity Federation for GKE is always enabled in Autopilot, while in Standard clusters it must be enabled if you want Pods to use fine-grained Google Cloud identities instead of broad node metadata access. Autopilot also imposes opinionated defaults and minimum/maximum resource request behavior for workloads. Those are good production features, but they are also a reminder that GKE is a managed product with platform opinions layered on top of Kubernetes.
The practical conclusion is this: use kubeadm to practice bootstrap, HA control planes, certificate renewal, static Pod troubleshooting, and etcd recovery. Use GKE Standard to practice workloads, Services, Ingress/Gateway, RBAC, autoscaling, and managed-cluster operations with a real cloud load balancer. Use GKE Autopilot to understand how managed guardrails affect scheduling, security, identity, and requests. For CKA exam readiness, GKE is a valuable perspective, but it is not a complete replacement for a self-managed lab because the exam blueprint still includes cluster creation and control-plane administration work that GKE intentionally hides.
GKE additions: zonal vs regional, VPC-native, and identity
The GKE comparison is clearer when you separate three managed-Kubernetes ideas: control-plane availability, Pod networking model, and workload identity.
Control plane is tied to a single zone. Existing workloads may continue during a zone-level control-plane outage, but management operations can be unavailable.
Control plane is replicated across zones in a region, improving API availability and upgrade resilience for production clusters.
Maps Kubernetes ServiceAccounts to Google Cloud IAM identities so Pods can use short-lived credentials instead of long-lived JSON keys.
| GKE networking model | How Pod IPs are represented | Operational consequence |
|---|---|---|
| Route-based | Pod CIDRs are routed through custom VPC routes to nodes. | Older model; route quotas and node-level routing become design constraints. |
| VPC-native | Pods use secondary subnet Alias IP ranges known to the VPC. | Better scaling model and enables container-native load balancing through NEGs. |
kubectl speed and imperative cheat-sheet
This is the single highest-leverage page for the clock. The exam is won by people who generate YAML
instead of typing it and who never lose time to syntax. Set up your shell once, then lean on
imperative commands and let kubectl write the boilerplate.
Golden rule: never hand-write a manifest you can scaffold. Generate it with
--dry-run=client -o yaml, redirect to a file, and edit only the few fields the task actually
requires.
Set up the shell once
alias k=kubectl
source <(kubectl completion bash) # k alias + completion are preset on the exam
complete -o default -F __start_kubectl k
export do='--dry-run=client -o yaml' # k create deploy web --image=nginx $do
export now='--force --grace-period=0' # k delete pod web $now
Generate objects fast (then edit the file)
k run nginx --image=nginx $do > pod.yaml
k create deploy web --image=nginx:1.27 --replicas=3 $do > deploy.yaml
k expose deploy web --port=80 --target-port=8080 --name=web-svc $do
k create cm app-config --from-literal=KEY=val --from-file=app.properties $do
k create secret generic app-secret --from-literal=PASSWORD=s3cret $do
k create job hello --image=busybox -- /bin/sh -c 'echo hi' $do
k create cronjob nightly --image=busybox --schedule='0 2 * * *' -- /bin/sh -c 'job' $do
k create ns dev $do
k create role pod-reader --verb=get,list,watch --resource=pods $do
k create rolebinding rb --role=pod-reader --serviceaccount=dev:app-reader $do
k create quota q --hard=pods=10,cpu=4,memory=8Gi $do
Mutate live objects without a file
k set image deploy/web web=nginx:1.28
k scale deploy/web --replicas=5
k label pod web tier=frontend --overwrite
k annotate deploy/web note='owner=team-a'
k edit deploy/web # opens $EDITOR, applies on save
k replace -f pod.yaml --force # recreate when an immutable field changed
k rollout status deploy/web && k rollout undo deploy/web
k explain pod.spec.containers --recursive | less # field reference, offline
Inspect fast
k get pods -A -o wide --show-labels
k get pods -l app=web,tier=frontend
k get events --sort-by=.lastTimestamp -A
k get po --field-selector status.phase=Running
k describe pod web | less
JSONPath, custom-columns, and sorting
These appear directly as tasks ("write the image of every Pod to a file", "list nodes and their kubelet version"). Memorize the shapes, not the exact strings.
| You need | Command shape |
|---|---|
| One field | k get pod web -o jsonpath='{.status.podIP}' |
| Filtered list |
k get nodes -o jsonpath='{.items[*].status.addresses[?(@.type=="InternalIP")].address}'
|
| Table of columns |
k get po -o custom-columns=NAME:.metadata.name,NODE:.spec.nodeName |
| Sorted output | k get po --sort-by=.metadata.creationTimestamp |
| Server-side filter | k get po --field-selector=spec.nodeName=node01 |
# every Pod name + its container images, one per line
k get pods -A -o jsonpath="{range .items[*]}{.metadata.name}{'\t'}{.spec.containers[*].image}{'\n'}{end}"
# nodes and kubelet versions as a clean table
k get nodes -o custom-columns=NAME:.metadata.name,VERSION:.status.nodeInfo.kubeletVersion
# pods ranked by restart count (find the flapping one)
k get pods --sort-by='.status.containerStatuses[0].restartCount'
Imperative generators are IDE autocomplete for YAML. A senior engineer doesn't retype an entire class from memory — they scaffold it and tweak. Typing manifests by hand on the clock is the equivalent of disabling autocomplete to prove a point.
Glossary
- Access modes — How a volume may be mounted by a claim:
ReadWriteOnce(one node),ReadOnlyMany,ReadWriteMany, andReadWriteOncePod. - Admission controller — Code in the API server that intercepts create, delete, and modify requests after authentication and authorization but before persistence.
- Affinity — Scheduling rules that attract Pods toward particular nodes or toward Pods with matching labels; anti-affinity is the inverse pattern.
- api-resources / deprecation —
kubectl api-resourcesandkubectl api-versionslist the kinds and group/versions a cluster serves; before an upgrade, migrate manifests off any removedapiVersion. - blue-green — A release pattern that runs two full versions and flips the Service selector to cut over instantly (and roll back just as fast), at the cost of double capacity.
- Bootstrap token — A short-lived secret used by
kubeadm joinfor TLS bootstrapping so a node can authenticate and join the cluster. - canary — A release pattern that routes a small share of traffic to the new version first (via replica ratio or a mesh) to limit blast radius before a full rollout.
- CNI — Container Network Interface; the plugin interface used to implement the Kubernetes network model.
- CRI — Container Runtime Interface; the main protocol between kubelet and the container runtime.
- crictl — A CLI for inspecting and debugging CRI-compatible container runtimes directly on a node.
- CSI — Container Storage Interface; the standard interface that exposes storage systems to Kubernetes.
- ConfigMap — A Kubernetes API object for storing non-confidential key-value configuration data that Pods can consume through env vars, arguments, or mounted files.
- Context — A kubeconfig grouping of cluster, user, and namespace used by
kubectlas the active connection profile. - Cordon and drain —
cordonmarks a node unschedulable;drainalso evicts its Pods for maintenance;uncordonreturns it to service. - CoreDNS — The default cluster DNS add-on that resolves Service and Pod names, normally
running in
kube-system. - Corefile — The CoreDNS configuration, stored in the
corednsConfigMap inkube-system; itskubernetesplugin serves cluster records andforwardsends the rest upstream. - CRD — CustomResourceDefinition; an API extension that introduces a new Kubernetes resource type.
- CronJob — A controller that creates Jobs on a repeating schedule.
- DaemonSet — A controller that ensures all or some nodes run a copy of a Pod.
- default-deny policy — A NetworkPolicy that selects all Pods with empty ingress/egress rules, used as a baseline so only explicitly allowed traffic flows.
- Deployment — A controller for stateless application workloads that supports declarative rollout and rollback behavior through ReplicaSets.
- egress — The direction of traffic leaving a Pod; NetworkPolicy egress rules must re-allow DNS (port 53) when a default-deny is in place.
- emptyDir — A Pod-scoped scratch volume created when the Pod starts and deleted when it stops; handy for caches and for sharing files between containers.
- EndpointSlice — A scalable representation of a subset of Service backend endpoints.
- Ephemeral container — A temporary container added to a running Pod for troubleshooting,
typically via
kubectl debug. - etcd — The consistent and highly available key-value store used as Kubernetes’ backing store for API data and cluster state.
- etcdctl / etcdutl — etcd command-line tools;
etcdctl snapshot savebacks up cluster state andetcdutl snapshot restorerebuilds the data directory. - FQDN — Fully-qualified domain name; for a Service it is
name.namespace.svc.cluster.local, resolvable from anywhere in the cluster. - Gateway API — A family of add-on API kinds for advanced traffic routing, centered around resources such as GatewayClass, Gateway, and HTTPRoute.
- Headless Service — A Service with
.spec.clusterIP: None, used when direct endpoint discovery is preferred over virtual IP load balancing. - Helm release — A deployed instance of a Helm chart, tracked with a revision history so it can be upgraded or rolled back.
- hostPath — A volume that mounts a file or directory from the node's own filesystem; powerful but node-bound and a security risk for application data.
- HPA — HorizontalPodAutoscaler; a controller that changes replica counts based on metrics.
- immutable Secret/ConfigMap — Setting
immutable: trueblocks edits, guarding against accidental change and cutting API-server load; to change it you recreate the object. - Ingress — A Kubernetes API object for external HTTP/HTTPS access to Services; it requires an Ingress controller to take effect.
- ingressClass — Selects which Ingress controller implements an Ingress via
ingressClassName; without it the rule may be silently ignored. - initContainer — A container that runs to completion before the app containers start; used for ordered setup such as migrations or dependency waits.
- Job — A controller for work that should run to completion rather than continuously.
- JSONPath — A query syntax used by
kubectl -o jsonpathto extract specific fields from API objects. - kubeadm — The Kubernetes bootstrap tool used to initialize and join cluster nodes following best-practice flows.
- kube-apiserver — The control-plane component that validates, serves, and persists Kubernetes API objects.
- kubeconfig — The client-side configuration used by
kubectlto locate clusters and authenticate. - kubectl debug — Creates a debugging session for a Pod or node, including ephemeral containers, when the image lacks tools.
- kubelet — The primary node agent that registers the node and manages Pod execution on that node.
- kube-proxy — The node-side network proxy that implements Service virtual IP behavior by watching Services and EndpointSlices.
- Kustomize — The built-in
kubectltool that customizes YAML with a base plus environment overlays, no templating language required. - LimitRange — A namespace policy that sets default, minimum, and maximum CPU/memory per Pod or container.
- Manual scheduling (nodeName) — Setting
spec.nodeNamebinds a Pod directly to a node, bypassing the scheduler entirely. - Metrics Server — The cluster add-on that supplies resource metrics for
kubectl topand the HorizontalPodAutoscaler. - Namespace — A virtual scope that isolates and groups resources within a cluster and bounds RBAC and quotas.
- NetworkPolicy — A Kubernetes resource that defines allowed Pod traffic flows at Layer 3 and 4 when supported by the network plugin.
- Operator — A controller pattern that combines custom resources with automation to manage a specific application or platform component.
- pathType — An Ingress path-match mode:
Prefixmatches by path segments,Exactmatches the whole path. - PersistentVolume — Cluster storage resource with its own lifecycle, independent of any one Pod.
- PersistentVolumeClaim — A user request for persistent storage that is matched to a PersistentVolume, often via a StorageClass.
- Pod CIDR — The IP range from which a node assigns Pod IPs; part of the flat cluster network the CNI plugin provides.
- PodDisruptionBudget — Limits how many Pods of an application may be voluntarily disrupted at once, for example during a node drain.
- Pod Security Admission — The built-in admission controller that enforces Pod Security Standards (privileged, baseline, restricted) per namespace via labels.
- PriorityClass — A cluster object that assigns scheduling priority to Pods and enables preemption of lower-priority Pods under pressure.
- Probes — Health checks run by the kubelet: liveness restarts a stuck container, readiness gates Service traffic, and startup protects slow-starting apps.
- RBAC — Role-based access control; the built-in authorization model using Roles, ClusterRoles, and Bindings.
- Reclaim policy — What happens to a PV when its claim is released:
Retainkeeps the data,Deleteremoves the underlying volume. - Recreate strategy — A Deployment update that terminates all old Pods before creating new ones, accepting brief downtime; contrast with RollingUpdate.
- ReplicaSet — The controller that keeps a set number of identical Pods running; normally managed by a Deployment.
- ResourceQuota — A namespace cap on aggregate resource usage and on the count of certain object types.
- scheduler profile — A named configuration of the scheduler's plugins; multiple profiles
let one scheduler behave differently for Pods that select it via
schedulerName. - Secret — A Kubernetes object used to store confidential information and expose it safely to Pods or system components.
- securityContext — Pod/container settings that control privilege, user, capabilities, and seccomp; required to satisfy the restricted Pod Security Standard.
- Service — A stable networking abstraction that exposes one or more Pods behind a consistent endpoint.
- Service CIDR — The virtual IP range for Services; these IPs are not real interfaces but rules programmed by kube-proxy.
- Service types —
ClusterIP(internal virtual IP, default),NodePort(a port on every node), andLoadBalancer(an external cloud load balancer). - ServiceAccount — An identity for processes running in Pods, bound to RBAC roles to grant API permissions.
- StatefulSet — A controller for workloads that need stable network identity, stable persistent storage, or ordered lifecycle behavior.
- Static Pod — A Pod managed directly by kubelet from a manifest file, commonly used by kubeadm for control-plane components.
- StorageClass — A description of a storage offering that also drives dynamic volume provisioning behavior.
- subPath — A volumeMount option that mounts a single file or sub-directory from a volume instead of its whole contents.
- Taint — A node property that repels Pods unless they have matching tolerations.
- Toleration — A Pod rule that allows scheduling onto nodes whose taints it matches, subject to all other scheduler constraints.
- Topology spread constraints — Rules that distribute Pods evenly across failure domains such as zones or hostnames.
- volumeBindingMode — A StorageClass setting;
WaitForFirstConsumerdelays provisioning until a Pod is scheduled so storage lands in the right zone or node. - volumeMode — A PV/PVC setting:
Filesystem(default) presents a mounted directory;Blockexposes a raw block device for storage-aware apps.
Reference websites used for the study guide
These are the public documentation and reference sites behind the guide’s Kubernetes, Gateway API, Helm, GKE, storage, networking, and troubleshooting sections.
Official exam domains, weights, format, and current exam framing.
Exam environment behavior, terminal setup, and installed command-line tools.
Official documentation domains allowed during the exam.
kubeadm bootstrap flow, prerequisites, kubeconfig setup, and CNI timing.
Stacked etcd versus external etcd topology guidance.
Control-plane and worker-node upgrade sequence.
Snapshot and restore concepts for etcd recovery.
Roles, ClusterRoles, bindings, ServiceAccounts, and authorization examples.
NoSchedule, PreferNoSchedule, NoExecute, and toleration behavior.
Node selectors, node affinity, inter-pod affinity, and scheduling constraints.
Namespace-level resource and object-count governance.
Container and Pod default, minimum, and maximum resource constraints.
Pod ingress/egress isolation, selectors, and additive policy behavior.
Ingress resource behavior, controllers, host/path routing, and TLS.
GatewayClass, Gateway, HTTPRoute, route attachment, and traffic routing model.
Conceptual mapping between Ingress and Gateway API resources.
GKE Standard and Autopilot responsibility boundaries.
Regional control-plane resilience and zonal/regional cluster considerations.
Alias IP ranges, secondary subnets, and GKE VPC-native networking.
Persistent disk provisioning and managed storage behavior in GKE.
GCE PD CSI driver usage and StorageClass parameters.
PV, PVC, access modes, reclaim policies, and binding model.
StorageClass-driven dynamic PV provisioning.
CoreDNS and service-discovery troubleshooting workflow.
Cluster-level diagnostic approach and node/workload triage.