INTERVIEW PREP
Interview questions
570 questions from real DevOps, SRE, platform engineering and MLOps interviews, with the answer an interviewer wants to hear. Try answering out loud first, then open the model answer.
Showing 181–195 of 490 questions
181.How does a rolling update work, and how do you roll back?MidKubernetes
The Deployment creates a new ReplicaSet and shifts Pods over gradually, respecting maxSurge and maxUnavailable and waiting for readiness. Roll back with kubectl rollout undo deployment/web, and watch progress with kubectl rollout status.
182.What is the difference between a StatefulSet and a Deployment?MidKubernetes
StatefulSet Pods have stable names (db-0, db-1), their own PersistentVolume each, and start and stop in order. Use it for databases and clustered systems; use Deployments for stateless apps.
183.How does the Horizontal Pod Autoscaler work?MidKubernetes
It checks metrics (usually CPU or memory from metrics-server, or custom metrics) and changes the replica count to keep the target, for example 70% CPU. It needs resource requests set, because utilization is measured against them.
184.What is a PodDisruptionBudget?MidKubernetes
It limits how many Pods of an app can be down at once during voluntary disruptions like node drains and upgrades, for example minAvailable: 2. It doesn't protect against crashes or node failures.
185.What are taints and tolerations?MidKubernetes
A taint on a node keeps Pods away unless they have a matching toleration. Use them to reserve nodes, for example GPU nodes or system nodes. Combine with node affinity to also attract the right Pods there.
186.How do you upgrade a cluster without downtime?SeniorKubernetes
Upgrade the control plane first, then node pools one at a time; cordon and drain nodes, with PodDisruptionBudgets, multiple replicas and anti-affinity so apps stay available. Check deprecated APIs before upgrading.
187.How would you secure a multi-tenant cluster?SeniorKubernetes
Namespace per team with RBAC least privilege, NetworkPolicies default-deny, Pod Security Admission (restricted), ResourceQuotas and LimitRanges, admission policies (Kyverno or Gatekeeper), image signing, and secrets from an external store.
188.How does RBAC work in Kubernetes?SeniorKubernetes
A Role (or ClusterRole) lists allowed verbs on resources; a RoleBinding (or ClusterRoleBinding) gives it to users, groups or ServiceAccounts. Give least privilege, avoid cluster-admin, and test with kubectl auth can-i.
189.What happens when you run kubectl apply -f deployment.yaml?SeniorKubernetes
kubectl sends the object to the API server, which authenticates, authorizes, runs admission controllers and stores it in etcd. The Deployment controller creates a ReplicaSet, which creates Pods; the scheduler picks nodes; kubelet on each node starts the containers through the runtime.
190.How do NetworkPolicies work, and what is a good default?SeniorKubernetes
They are firewall rules for Pods, chosen by labels, enforced by the CNI (Calico, Cilium...). Start each namespace with a default deny for ingress (and ideally egress), then allow only the traffic each app needs, including DNS.
191.What is the difference between a chart and a release?BeginnerHelm
A chart is a package of templates and default values. A release is one installed instance of a chart in a namespace, with its own name and revision history.
192.How do values get merged?BeginnerHelm
Chart defaults first, then each -f file in order, then --set flags; later sources win. Maps merge key by key, lists are replaced whole.
193.What is Helm, and why use it instead of plain YAML?BeginnerHelm
Helm is a package manager for Kubernetes. A chart is a set of templates plus default values, so one chart can deploy to many environments with different values, and Helm tracks each install as a release you can upgrade or roll back.
194.What files are in a Helm chart?BeginnerHelm
Chart.yaml (name, version, dependencies), values.yaml (defaults), templates/ (Kubernetes YAML with Go templates), and optionally charts/ for dependencies, values.schema.json and templates/NOTES.txt.
195.How do you see the YAML a chart will create before installing?BeginnerHelm
helm template myrel ./chart -f values-prod.yaml renders it locally. helm install --dry-run --debug renders it against the cluster, and the helm-diff plugin shows what an upgrade will change.