Container Orchestra, 2015
Kubernetes turns a pile of machines into one scheduler you talk to. This era simulates a control plane and two workers, driven with kubectl: pods, deployments, services, storage, and the triage you need when something will not start.
Infrastructure and operations track · 34 missions · boss mission, written exam and certificate · free, no signup. Everything below runs in the browser terminal on the SERVBG home page.
What you will do
- list the cluster's nodes and their status
kubectl get nodesKubernetes (Greek for "helmsman") shipped from Google in 2014, built on a decade of internal Borg experience. A node is any machine, control-plane or worker, running a kubelet.
- see extra columns: internal IP, OS image, kernel, container runtime
kubectl get nodes -o wide-o wide is the same object, more columns — no different API call, just more of the response rendered. Every kubectl output is a real Kubernetes object underneath.
- inspect one node in full: capacity, allocatable resources, conditions
kubectl describe node k8s-node1Capacity is the whole box; Allocatable is what the kubelet will actually schedule onto (it reserves some for itself and the OS). Conflating the two is a classic capacity-planning mistake.
- list namespaces — the cluster's logical partitions
kubectl get nsdefault, kube-system, kube-public, kube-node-lease ship with every cluster. Namespaces scope names and RBAC, not performance or security in themselves.
- see the control plane itself, running as pods
kubectl get pods -n kube-systemetcd, kube-apiserver, kube-controller-manager, kube-scheduler — on a kubeadm cluster, the control plane is not magic infrastructure, it is pods, same as your app, just in kube-system.
- view the cluster's recent event log
kubectl get eventsEvents are the audit trail of "what just happened" — Scheduled, Pulled, Created, Started. Every describe's Events section is a filtered view of exactly this stream.
- view live CPU/memory usage per node (via the metrics-server)
kubectl top nodestop reads from the metrics-server, a separate lightweight component — not etcd. If metrics-server is not installed, top simply fails; it is optional, not core.
- list pods in the current (default) namespace
kubectl get podsA pod is Kubernetes' smallest deployable unit — one or more containers that always land on the same node and share network + storage.
- list deployments — the controllers that keep pods running
kubectl get deployA Deployment does not run containers directly — it manages a ReplicaSet, which manages Pods. Three layers so rolling updates and rollbacks have somewhere to keep history.
- see which node each pod actually landed on, and its pod IP
kubectl get pods -o wideThe scheduler places each pod exactly once, based on resource requests, affinity/anti-affinity, and taints — -o wide is how you see the outcome of that decision.
- declaratively create a new deployment from a manifest
kubectl apply -f api-deploy.yamlapply is declarative: it diffs the manifest against the live object and reconciles the difference. create is imperative and simply fails if the object already exists — apply is the everyday tool.
- change a deployment's desired replica count
kubectl scale deploy web --replicas=3Scaling just edits one field, replicas, on the Deployment spec. The ReplicaSet controller does the rest — it is a reconciliation loop, not a one-shot script.
- delete a single pod directly and watch the deployment heal itself
kubectl delete pod web-6c5df97d97-4kxplA core Kubernetes lesson: you almost never delete a pod to "fix" it. Its controller notices the gap between desired and actual state and creates a replacement, self-healing, not magic.
- list services — the stable network identities in front of pods
kubectl get svcPod IPs are ephemeral — a new pod gets a new IP every time. A Service gives a stable ClusterIP and DNS name that survives pods being replaced underneath it.
- create a Service that load-balances traffic across a deployment's pods
kubectl expose deploy web --port=80 --target-port=80expose reads the deployment's pod template labels and turns them straight into the new Service's selector — no separate YAML required for the common case.
- see which pod selector each service is load-balancing to
kubectl get svc -o wideThe SELECTOR column is the entire mechanism: any pod whose labels match gets automatically wired into the Service's Endpoints — no manual registration.
- inspect a service's endpoints — the actual pod IPs it is routing to
kubectl describe svc webIf Endpoints is empty, the selector matched nothing. That is the most common "service does not work" root cause, and the first thing to check.
- filter pods by a label selector — the same mechanism services use internally
kubectl get pods -l app=webLabels are just key=value tags. Every Service, ReplicaSet and NetworkPolicy in the cluster is really just "act on whatever currently matches this selector."
- tunnel a local port straight to a service, bypassing Ingress entirely
kubectl port-forward svc/web 8080:80port-forward is the fastest way to poke a service or pod from your own laptop for debugging — it goes over the API server, not the cluster network, so it works even with no Ingress configured yet.
- list ConfigMaps — non-sensitive configuration stored in the cluster
kubectl get cmA ConfigMap decouples configuration from the container image — the same image can run in dev or prod by mounting a different ConfigMap, nothing rebuilt.
- view a ConfigMap's actual key/value data
kubectl describe cm app-configConfigMap data is plaintext by design — describe happily prints it. That is exactly why it must never hold a password or API key; that is what Secrets are for.
- list Secrets — and notice describe never shows you the values
kubectl get secretSecrets are base64-encoded, not encrypted, by default — a courtesy against accidental terminal leaks, not real security. Real protection needs RBAC plus encryption-at-rest in etcd.
- roll out a bad image tag and watch the deployment start to update
kubectl set image deployment/api api=api:v2-brokenset image is a one-line shortcut for editing .spec.template.spec.containers[].image — it triggers exactly the same rolling update apply -f would.
- check whether the rollout is actually progressing
kubectl rollout status deployment/apiBy default a Deployment keeps the old, working ReplicaSet up until the new one is Ready — that is why the rollout hangs instead of taking your app down.
- read the Events section to find out WHY the new pod is stuck
kubectl describe pod api-5f6b7c8d9e-p4q5rImagePullBackOff means the kubelet cannot even fetch the image — a typo'd tag, a private registry with no pull secret, or a network-policy block. describe's Events tell you which.
- try to read the container's logs — and see why that is the wrong tool here
kubectl logs api-5f6b7c8d9e-p4q5rA container that never started has no logs to show. This is the tell that separates an ImagePullBackOff (check describe) from a CrashLoopBackOff (check logs) — same symptom, opposite diagnosis.
- roll back to the last working revision
kubectl rollout undo deployment/apiEvery Deployment keeps a revision history. undo is a one-line "put the previous ReplicaSet back to full scale, retire the broken one" — no manifest editing required under pressure.
- force a rolling restart of an already-healthy deployment
kubectl rollout restart deployment/webA ConfigMap or Secret consumed as an environment variable never updates in a running container — only volume-mounted keys get periodic kubelet syncs. rollout restart is the standard way to pick up env-var config changes: new pods, same image, fresh environment.
- load the boss scenario — a deployment stuck in CrashLoopBackOff
scenario startGood incident response is a method, not a guess: reproduce the symptom, read the evidence (describe, then logs), form a hypothesis, fix the root cause, then verify.
- confirm the symptom and read the restart count
kubectl get pods -l app=checkoutA climbing RESTARTS count with STATUS CrashLoopBackOff means the container starts, then exits non-zero, every time — the kubelet is not the problem, the application is.
- find the exit code, the last-terminated reason, and the injected environment variable
kubectl describe pod checkout-8f7d6c5b4-z1x2cExit Code 1 plus a "Terminated: Error" is the application crashing on its own — describe's Environment section is where a bad env var like a mistyped hostname hides in plain sight.
- read the actual crash message — the smoking gun
kubectl logs checkout-8f7d6c5b4-z1x2cUnlike the ImagePullBackOff a few missions ago, this container DID start, so it DID log, and its last words before dying are exactly the evidence you need.
- apply a corrected manifest: fixed env var AND right-sized to 3 replicas
kubectl apply -f checkout-fix.yamlA real fix goes in the manifest, not a live kubectl edit — so the correction survives the next apply instead of silently drifting from what is checked in.
- Boss missionFINAL STEP — expose the now-healthy deployment as a service and confirm the whole incident is resolved
kubectl expose deploy checkout --port=80 --target-port=8080Diagnose (describe + logs), fix the root cause (apply), scale for real load, expose it to the network — that four-step loop is the entire job, and it is exactly what a CKA exam performance task expects you to demonstrate.
Certificate
This track is certifiable. Clear the boss mission in the terminal, then run EXAM K8S for the written paper: 20 server-graded questions drawn from our own bank, pass mark 14 of 20. The certificate is issued once both are done, and it carries a verification code.
Independently developed; not affiliated with, endorsed by, or sponsored by the Cloud Native Computing Foundation. Content is aligned to the Cloud Native Computing Foundation’s publicly published exam objectives for the Certified Kubernetes Administrator (CKA).