⎈ Kubernetes — interview questions
10 questions. Filter by what the role asks for; open one for the six layers of the answer. The course is where the answers come from.
10 of 10
01A teammate wants to cache a per-user session on the pod's local disk "since the pod usually stays around for a while." What's wrong with that plan, and what does "usually" actually mean here?Core objectseasy0-2y02A curious engineer runs `ping` against a Service's ClusterIP from inside the cluster and gets no reply, but `curl`ing the same IP on the Service's port works fine. Is something broken?Networkingeasy0-2y03A teammate wires the Postgres connection check into `/actuator/health/liveness` so "the pod restarts if the database is unreachable." The database has a rough five minutes one afternoon. What happens to the service, and what should the probe wiring actually look like?Configuration and probesmedium3-5y04`kubectl describe pod` shows `Last State: Terminated, Reason: OOMKilled, Exit Code: 137`, but the application's own logs have no stack trace, no exception, nothing. Why is there no Java-side evidence, and does the pod's QoS class have anything to do with why it was this pod that got killed?Resources and QoSmedium3-5y05A Deployment is set to `maxUnavailable: 0`, and a rollout to a new image version has been "in progress" for twenty minutes with `kubectl rollout status` still waiting. What's actually happening, and where do you look first?Rolloutsmedium3-5y06A pod behind a Service starts failing its readiness probe while keeping its existing long-lived connections open. Precisely what happens to (1) a request already in flight on an existing connection, and (2) a brand-new connection attempt, and why are those two answers different?Networkinghard5-8y07A pod is given `requests: { cpu: 500m }` with no CPU limit, and `limits: { memory: 512Mi }` with no memory request. Under a CPU burst with idle node capacity, and separately under a memory leak, what actually happens in each case — and what is the pod's effective memory request, given only a limit was written?Resources and QoShard5-8y08A Deployment runs 4 replicas with a CPU request of 500m each, targeting 60% average utilisation. The metrics API reports the pods averaging 82%. What does the HPA compute as the desired replica count, and why does `kubectl get hpa` sometimes show a target below the configured one for longer than seems reasonable?Scalinghard5-8y09A ConfigMap consumed as environment variables is updated to fix a bad setting, but the running pods keep behaving as if nothing changed, even hours later. Separately, a colleague is confused that `kubectl get rs` shows two ReplicaSets with nonzero replicas mid-rollout and assumes the deploy is stuck. Explain both, and design the fix for the first one.Configuration and probessenior8+y10A Deployment runs 3 replicas of a service the team considers highly available, with a PodDisruptionBudget of `minAvailable: 2`. A single node fails unexpectedly (not a drain — the node just goes away). Does the PDB protect the service in this incident, and if the 3 replicas happened to be co-located on that one node, could the PDB have prevented that from being possible in the first place?Rolloutssenior8+y