Skip to content
tezvyn:

Docker & Kubernetes

Containers, Helm, orchestration, service mesh

144 bites

Test yourself: Top 30 Docker & Kubernetes interview questionsMultiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.

Interview questions in Docker & Kubernetes, page 3

intermediate1 min read

The Kubernetes reconciliation loop

A controller continuously observes actual state, compares to desired state in the spec, and acts to close the gap, level-triggered not edge-triggered.

intermediate1 min read

Deployment versus StatefulSet

Deployments suit interchangeable stateless replicas, StatefulSets give stable identities, ordered rollout, and per-Pod persistent storage for stateful systems.

advanced1 min read

Scheduler filtering and scoring phases

Filtering eliminates infeasible Nodes via resources, taints, and affinity, then scoring ranks the survivors to pick the best, after which the Pod is bound.

advanced1 min read

CRDs and the Operator pattern

CRDs add new API object types, an Operator pairs a CRD with a controller that runs a reconciliation loop encoding domain operational knowledge.

easy1 min read

Deployment, ReplicaSet, and Pod hierarchy

A Deployment manages ReplicaSets, each ReplicaSet keeps a set of identical Pods, and Deployments add rolling updates, rollback, and self-healing.

easy1 min read

Create a Deployment with 3 replicas via kubectl

Kubectl create deployment webapp --image=my-app:1.0, then kubectl scale to 3 replicas, or use --replicas if supported.

easy1 min read

Debugging a Pod in CrashLoopBackOff

Kubectl describe pod for events, restarts, and last state; kubectl logs (with --previous) for the crashed container's output.

intermediate1 min read

How a Deployment rolling update works

New image creates a new ReplicaSet; Deployment scales it up while scaling the old one down per maxSurge/maxUnavailable; old ReplicaSet is retained at zero for rollback.

intermediate1 min read

Rolling back a bad Deployment

Kubectl rollout undo deployment/NAME reverts to the prior revision by scaling the old ReplicaSet back up and the bad one down.

intermediate1 min read

Liveness vs readiness probes

Liveness restarts a stuck container; readiness gates traffic by controlling Service endpoint membership. Readiness-only fits an app that pauses to reload a large cache but is still healthy.

intermediate1 min read

Sharing ephemeral cache between containers in a Pod

Use an emptyDir volume defined in the Pod spec and mounted into each container at the cache path; it is created with the Pod and deleted when the Pod is removed.

advanced1 min read

Tuning maxSurge and maxUnavailable

MaxSurge allows Pods above desired; maxUnavailable allows Pods below desired during update. For zero downtime and speed, set maxUnavailable 0 and maxSurge high (e.g. 100%).

advanced1 min read

Stalled rollouts and progressDeadlineSeconds

With maxUnavailable respected, the rollout pauses partway and old Pods keep serving; progressDeadlineSeconds marks the Deployment as failed after no progress for that window.

advanced1 min read

Spreading Pods one-per-node for availability

Use required podAntiAffinity with topologyKey kubernetes.io/hostname matching the Deployment's own pod labels, so the scheduler refuses to co-locate two Pods on a node.

easy1 min read

Why Kubernetes Services exist

Pod IPs are ephemeral and change on reschedule; a Service gives a stable virtual IP and DNS name plus load balancing across healthy Pods via label selectors.

easy1 min read

ClusterIP vs NodePort vs LoadBalancer

ClusterIP for internal-only access; NodePort opens a port on every node for basic external reach; LoadBalancer provisions a cloud load balancer for production external traffic.

intermediate1 min read

Cross-namespace Service DNS resolution

CoreDNS gives each Service a name; cross-namespace you must qualify it as my-service.B.svc.cluster.local (or my-service.B).

intermediate1 min read

Ingress for host and path routing

Use an Ingress with an Ingress controller for layer-7 host/path routing behind one external IP, instead of one cloud LoadBalancer per service.

intermediate1 min read

Headless Services and direct Pod DNS

Set clusterIP: None so no virtual IP or proxy load balancing; DNS returns individual Pod IPs (A records). Primary use: StatefulSets needing stable per-Pod addressing.

intermediate1 min read

Debugging Service connectivity between Pods

Kubectl get endpoints to check the Service has Pod IPs (selector match); kubectl describe service to verify selector and ports; exec into the frontend to curl the Service DNS name.

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles