Learn to run, configure, update, scale and troubleshoot Kubernetes workloads from the CLI: Deployments, ConfigMaps, probes, Jobs and HPA for the CKA.
It is 2:10 AM on the night of a big sale.
How to create and scale a Deployment with kubectl The fastest way to create a Deployment is kubectl create deployment NAME --image=IMAGE...
How to create a DaemonSet when kubectl has no create command kubectl has no create daemonset, so generate a Deployment's YAML and convert it by hand.
How to create a ConfigMap and a Secret from the command line A ConfigMap holds non-sensitive settings as key-value pairs, and a Secret holds...
What startup, readiness and liveness probes each do A liveness probe restarts a stuck container, a readiness probe removes an unready Pod from...
How the HPA decides replica counts A HorizontalPodAutoscaler (HPA) compares the average CPU use across a Deployment's Pods to a target percentage and...
It is 2:10 AM on the night of a big sale.
How to create and scale a Deployment with kubectl The fastest way to create a Deployment is kubectl create deployment...
How to create a DaemonSet when kubectl has no create command kubectl has no create daemonset, so generate a...
How to create a ConfigMap and a Secret from the command line A ConfigMap holds non-sensitive settings as key-value...
What startup, readiness and liveness probes each do A liveness probe restarts a stuck container, a readiness probe...
How the HPA decides replica counts A HorizontalPodAutoscaler (HPA) compares the average CPU use across a Deployment's...
How to diagnose any broken workload in four commands Run get, describe, logs and events in that order, and you will...
Build the cluster and deploy the application You will build a throwaway cluster, deploy an app configured through a...
Eight drills with solutions These drills use imperative commands and docs lookups instead of full YAML.
Short knowledge check Answer these without looking back, then check yourself against the answers below.
Roles that use the skills in this module.
DevOps Engineer
Site Reliability Engineer
Platform Engineer
Not a software engineer sheet. Every problem comes from real DevOps, SRE, Platform and Cloud interviews, from your first script to a system you build yourself.
Open the Coding SheetA ReplicaSet keeps a fixed number of identical Pods running, while a Deployment manages ReplicaSets for you. Every time you change the Pod template, the Deployment creates a new ReplicaSet and shifts Pods over gradually, which is what gives you rolling updates and rollbacks. You almost never create a ReplicaSet by hand.
No, updating a ConfigMap never restarts Pods by itself. Pods that read it through environment variables keep the old values until they are recreated, for example with kubectl rollout restart. Pods that mount it as a volume see the new files after a short delay, unless the mount uses subPath, in which case the files never update.
An HPA shows <unknown> when it cannot read CPU usage, which usually means metrics-server is missing or unhealthy, or the Pods have no CPU request. Utilization is usage divided by the request, so without a request there is nothing to divide by. Run kubectl describe hpa and read the events to see which cause applies.
A liveness probe restarts a container that is stuck, while a readiness probe only removes the Pod from Service traffic until it passes again. Use liveness for hung processes and readiness for warm-up or slow dependencies. If a startup probe is configured, neither of the other two runs until it has succeeded.
No, not by default: a Secret is only base64 encoded, which anyone can reverse with one command. Its protection comes from RBAC limiting who can read it, and optionally from encryption at rest configured on the cluster. Treat the base64 form as formatting, not security.