10% OFF VCF Special Offer – Limited Seats Available! Claim my offer
Interview questions · DevOps

DevOps Engineering Professional Program interview questions

15 questions employers ask for DevOps Engineer · Site Reliability Engineer · Platform Engineer roles, each with a model answer, what the interviewer is checking and the likely follow-up.
1 TechnicalContainersEntry level

What is the difference between a container and a virtual machine?

A VM virtualizes hardware and runs a full guest OS, so it is heavier and slower to start. A container shares the host kernel and isolates only the process, filesystem and network namespaces, so it is lightweight, starts in milliseconds and packs densely. Containers trade the stronger isolation of a VM for speed and efficiency.

How did you do?
2 TechnicalContainersMid level

How do you keep a Docker image small and secure?

Use a minimal or distroless base, multi-stage builds so build tools do not ship in the final image, a .dockerignore, pinned versions, and run as a non-root user. Combine layers sensibly, scan the image (Trivy/Grype), and do not bake secrets into layers — pass them at runtime.

How did you do?
3 TechnicalKubernetesSenior

Explain what happens when you run kubectl apply for a Deployment.

The API server validates and stores the desired state in etcd. The Deployment controller creates/updates a ReplicaSet, which creates Pods; the scheduler assigns each Pod to a node by resources and constraints; the kubelet on that node tells the container runtime to pull images and start containers, and reports status back. Controllers continuously reconcile actual state toward the declared state.

How did you do?
4 TechnicalKubernetesSenior

A Pod is stuck in CrashLoopBackOff. How do you debug it?

kubectl describe pod for events (image pull, OOMKilled, failed probes) and kubectl logs --previous for the crashed container's output. Check the command/args, env and config, resource limits (OOM), and liveness-probe settings that may be killing a slow starter. Fix the root cause rather than just restarting.

How did you do?
5 TechnicalKubernetesMid level

How do you expose an app inside Kubernetes to external users?

A Service gives stable in-cluster access (ClusterIP); for external traffic use a LoadBalancer service or, more commonly, an Ingress with an ingress controller to route HTTP(S) by host/path and terminate TLS. The pattern is Pods → Service → Ingress → users, so Pods can churn without changing the external endpoint.

How did you do?
6 TechnicalKubernetesMid level

ConfigMap vs Secret, and how should Secrets really be protected?

Both inject configuration, but Secrets are for sensitive values and are only base64-encoded, not encrypted, by default. Enable encryption at rest in etcd, restrict access with RBAC, avoid committing them to git, and prefer an external manager (Vault, cloud secrets, External Secrets operator) for production.

How did you do?
7 TechnicalCI/CDMid level

What makes a good CI/CD pipeline?

Fast feedback (build + unit tests on every commit), fail-early quality gates (lint, tests, security/image scans), immutable build artifacts promoted unchanged through environments, and automated deploys with an easy rollback. It should be reproducible and defined as code, so the pipeline itself is versioned and reviewable.

How did you do?
8 TechnicalCI/CDSenior

Compare rolling, blue-green and canary deployments.

Rolling replaces instances gradually — simple, minimal extra capacity, but a bad release reaches everyone slowly. Blue-green keeps two full environments and flips traffic at once — instant rollback, but double the resources. Canary sends a small percentage to the new version and watches metrics before widening — safest for risky changes, but needs good traffic routing and monitoring.

How did you do?
9 TechnicalIaCMid level

Why use Infrastructure as Code, and what does idempotency mean here?

IaC (Terraform, Ansible) makes infrastructure versioned, reviewable and repeatable instead of hand-clicked and undocumented. Idempotent means applying the same definition repeatedly converges to the same state without duplicating or breaking resources — so you can re-run safely, and drift is corrected rather than compounded.

How did you do?
10 TechnicalObservabilityMid level

What are the pillars of observability and how do you use them together?

Metrics (trends and alerting — Prometheus), logs (what happened in detail), and traces (a request's path across services). You alert on metrics, then drill into traces to find the slow or failing hop, then read that service's logs for the exact cause. One without the others leaves blind spots.

How did you do?
11 TroubleshootingTroubleshootingEntry level

A Kubernetes pod is Pending. What are the usual reasons?

kubectl describe pod shows the event: not enough CPU or memory on any node for the requests, a node selector, taint or affinity that no node matches, or a PersistentVolumeClaim that is not bound. Fix the requests, add capacity or adjust the scheduling rules.

What they are checking: Reading scheduler events.

Likely follow-up: What is the difference between taints and node affinity?

How did you do?
12 TechnicalTroubleshootingEntry level

A Docker image is 2 GB. How do you make it smaller?

Use a slim or distroless base image, multi-stage builds so build tools stay out of the final image, combine and clean up package installs in one layer, and add a .dockerignore so the build context does not copy logs or node_modules.

What they are checking: Practical image hygiene.

Likely follow-up: Why do smaller images also improve security?

How did you do?
13 ScenarioScenarioMid level

A deployment to production broke the site. What do you do first?

Restore service first: roll back (kubectl rollout undo or redeploy the previous version), confirm recovery with monitoring, tell people, then find the cause from logs and the diff, and add a test or check so it cannot happen again. Blameless review afterwards.

What they are checking: Restore first, then root cause.

Likely follow-up: How do canary releases reduce this risk?

How did you do?
14 TechnicalMonitoringMid level

What would you monitor for a web service?

The four golden signals: latency, traffic, errors and saturation, plus logs and traces for debugging. Alert on symptoms users feel (error rate, slow responses) rather than every CPU spike, and define SLOs.

What they are checking: SRE basics.

Likely follow-up: What is an error budget?

How did you do?
15 HR & behaviorHREntry level

How do you work with developers who see operations as a blocker?

Make the safe path the easy path: templates, self-service pipelines and clear guardrails. Listen to their pain points, share on-call, and measure improvements such as deploy frequency and lead time together.

What they are checking: DevOps culture.

Likely follow-up: What are the four DORA metrics?

How did you do?
Free for learners

Practice these DevOps Engineering Professional Program questions with a trainer

Get the full set as a printable PDF, then a 20-minute one-to-one mock interview on WhatsApp or Google Meet. The trainer asks these questions and the follow-ups, and tells you exactly what to improve. Reply STOP any time.