Skip to content
$ lynuxpro

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 226–240 of 570 questions

226.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.

227.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.

228.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.

229.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.

230.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.

231.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.

232.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.

233.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.

234.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.

235.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.

236.Why did my upgrade drop settings from the last release?MidHelm

helm upgrade starts from chart defaults plus what you pass now; it does not remember previous values. Pass the same values files every time, or use --reuse-values / --reset-then-reuse-values for a quick fix.

237.How do you make deploys roll back automatically?MidHelm

helm upgrade --install ... --wait --rollback-on-failure --timeout 5m (Helm 4's name for --atomic). Helm waits for readiness and rolls back if it times out or fails.

238.Why must selector labels never change?MidHelm

A Deployment's selector is immutable. If labels in it change (for example adding the version), the upgrade fails with 'field is immutable'. Keep selectors to name and instance only.

239.What is the difference between chart version and app version?MidHelm

version in Chart.yaml is the chart's own version, bumped on any chart change (SemVer). appVersion is the version of the app it deploys, often used as the default image tag.

240.What are Helm hooks?MidHelm

Annotated resources that run at points in a release, like pre-install or pre-upgrade, often a Job for database migrations. Set a hook delete policy so old hook Jobs are cleaned up.