--- title: "DevOps Engineer Interview Questions: 40+ Questions with Answers (2026)" description: "Comprehensive list of DevOps engineer interview questions covering CI/CD, cloud platforms, Kubernetes, monitoring, and Infrastructure as Code. Prepare for interviews at top companies." canonical: "https://mortit.com/blog/devops-engineer-interview-questions" --- Interview Prep # DevOps Engineer Interview Questions 40+ questions covering CI/CD, cloud, Kubernetes, and IaC-with answers that show depth. 22 min read Updated February 2026 TL;DR DevOps interviews test six areas: **CI/CD** (pipeline design, testing strategies), **Cloud** (AWS/GCP/Azure architecture), **Containers** (Docker, Kubernetes orchestration), **Monitoring** (observability, alerting, incident response), **Infrastructure as Code** (Terraform, automation), and **Behavioral**. The best candidates show both hands-on expertise and an understanding of DevOps culture and principles. ## What DevOps Interviews Look Like DevOps interviews are uniquely practical. Expect hands-on scenarios, troubleshooting exercises, and architecture discussions alongside traditional questions. Companies want to see that you can build, deploy, and maintain production systems-not just talk about them. | Category | What It Tests | Example Question | | --- | --- | --- | | **CI/CD** | Pipeline design, automation, testing | "Design a deployment pipeline for a microservices app" | | **Cloud** | Services, architecture, cost optimization | "How would you design a multi-AZ deployment on AWS?" | | **Containers** | Docker, Kubernetes, orchestration | "A pod is stuck in CrashLoopBackOff-walk me through debugging it" | | **Monitoring** | Observability, alerting, incident response | "How would you set up monitoring for a new service?" | | **IaC** | Terraform, automation, configuration mgmt | "How do you manage state in Terraform?" | | **Behavioral** | Incident response, collaboration, culture | "Tell me about an outage you handled under pressure" | ## CI/CD Pipeline Questions CI/CD is the backbone of DevOps. Interviewers want to know you can design pipelines that are fast, reliable, and secure-not just copy-paste YAML from a tutorial. 1. **Explain the difference between Continuous Integration, Continuous Delivery, and Continuous Deployment.** 2. **How would you design a CI/CD pipeline for a microservices application with 20 services?** 3. **What is the difference between blue-green deployments and canary deployments? When would you use each?** 4. **How do you handle database migrations in a CI/CD pipeline?** 5. **What testing stages would you include in a pipeline? In what order?** 6. **How do you implement rollback in a deployment pipeline?** 7. **Explain GitOps. How does it differ from traditional CI/CD?** 8. **How do you handle secrets in a CI/CD pipeline?** **Sample Answer: Blue-Green vs Canary:** **Blue-green deployment** maintains two identical production environments. You deploy the new version to the idle environment (green), run smoke tests, then switch the load balancer to route all traffic to green. If something fails, you switch back to blue instantly. The downside is cost-you are paying for double the infrastructure. **Canary deployment** gradually routes a small percentage of traffic (say 5%) to the new version while monitoring key metrics. If error rates or latency stay normal, you increase traffic incrementally (5% to 25% to 50% to 100%). This is more cost-efficient and catches issues that only appear under real traffic patterns. I use blue-green for critical services where instant rollback is essential (payment processing). I use canary for user-facing services where I want to observe real user behavior before full rollout. #### Pipeline Design Tip When designing a pipeline in an interview, draw the stages in order: **Build** (compile, lint) then **Unit Tests** then **Integration Tests** then **Security Scan** then **Staging Deploy** then **E2E Tests** then **Production Deploy**. Explain what happens if any stage fails and how the team gets notified. ## Cloud Platform Questions (AWS/GCP/Azure) Most DevOps roles require deep knowledge of at least one cloud provider. AWS is the most commonly tested, but the concepts transfer across platforms. 9. **Explain the difference between EC2, ECS, EKS, and Lambda. When would you use each?** 10. **How would you design a highly available architecture on AWS? Explain multi-AZ and multi-region strategies.** 11. **What is a VPC? How do you design network architecture with public and private subnets?** 12. **Explain IAM roles, policies, and the principle of least privilege in AWS.** 13. **How do you optimize cloud costs? What strategies have you used?** 14. **What is the difference between S3 storage classes? How do you choose the right one?** 15. **Explain how DNS works in the cloud (Route53/Cloud DNS). What is a hosted zone?** #### Cloud Architecture Framework When answering cloud architecture questions, address these five pillars: **1\. Reliability:** Multi-AZ, auto-scaling, health checks **2\. Security:** IAM, encryption at rest/transit, VPC design **3\. Performance:** Right-sizing, caching, CDN **4\. Cost:** Reserved instances, spot instances, right-sizing **5\. Operations:** Monitoring, automation, disaster recovery ## Containers & Kubernetes Questions Kubernetes has become the standard for container orchestration. Expect both conceptual questions and practical troubleshooting scenarios. 16. **What is the difference between a Docker image and a container? How do layers work?** 17. **How would you reduce a Docker image size from 1.2GB to under 200MB?** 18. **Explain the Kubernetes architecture: what do the control plane components do?** 19. **A pod is stuck in CrashLoopBackOff. Walk me through how you would debug it.** 20. **Explain the difference between a Deployment, StatefulSet, and DaemonSet.** 21. **How does Kubernetes networking work? Explain Services, Ingress, and NetworkPolicies.** 22. **What are liveness and readiness probes? Why are they important?** 23. **How do you handle persistent storage in Kubernetes?** **Sample Answer: Debugging CrashLoopBackOff:** When a pod is in CrashLoopBackOff, I follow this systematic approach: **1\. Check pod events:** kubectl describe pod \[name\] - look for error messages in Events section (OOMKilled, image pull errors, failed mounts) **2\. Check logs:** kubectl logs \[name\] --previous - the --previous flag shows logs from the crashed container, which is critical since the current container may have no logs yet **3\. Check resources:** Is the container hitting memory limits (OOMKilled)? Check resource requests/limits **4\. Check configuration:** Are environment variables, ConfigMaps, and Secrets mounted correctly? **5\. Check probes:** Is the liveness probe too aggressive? A probe that checks before the app starts will cause a restart loop The most common causes I have seen are: missing environment variables, incorrect image tags, and liveness probes with insufficient initialDelaySeconds. ## Monitoring & Observability Questions You cannot fix what you cannot see. Monitoring questions test whether you can build systems that are observable and set up alerting that is actionable. 24. **What is the difference between monitoring and observability?** 25. **Explain the three pillars of observability: metrics, logs, and traces.** 26. **How would you set up monitoring for a new microservice? What metrics would you track?** 27. **What are SLIs, SLOs, and SLAs? How do they relate to each other?** 28. **How do you design alerts that are actionable and avoid alert fatigue?** 29. **Explain distributed tracing. How does it help debug issues across microservices?** #### The Four Golden Signals Google's SRE book defines four golden signals that every service should monitor: **Latency:** How long requests take (p50, p95, p99) **Traffic:** How many requests your service handles **Errors:** Rate of failed requests (5xx, application errors) **Saturation:** How full your resources are (CPU, memory, disk, connections) ## Infrastructure as Code Questions Infrastructure as Code is a core DevOps practice. Terraform is the most commonly tested tool, but the principles apply to any IaC tool. 30. **What is Infrastructure as Code? Why is it better than manual provisioning?** 31. **How does Terraform manage state? What are the risks of state file corruption?** 32. **Explain the difference between Terraform and Ansible. When would you use each?** 33. **How do you handle multiple environments (dev, staging, prod) in Terraform?** 34. **What is Terraform drift? How do you detect and resolve it?** 35. **How do you structure Terraform code for a large organization with multiple teams?** **Sample Answer: Terraform State Management:** Terraform state is a JSON file that maps your configuration to real-world resources. It is how Terraform knows what exists and what needs to change. **Best practices:** 1\. **Remote state:** Store state in S3 (with DynamoDB for locking) or Terraform Cloud-never in local files or Git 2\. **State locking:** Prevents two people from applying changes simultaneously, which could corrupt state 3\. **State isolation:** Use separate state files per environment (dev/staging/prod) to limit blast radius 4\. **Encryption:** Enable encryption at rest for the state file since it may contain sensitive outputs If state gets corrupted, you can import existing resources with terraform import, or in worst case, recreate state by importing each resource. This is why state backups and versioning (S3 versioning) are essential. ## Behavioral Questions DevOps is as much about culture and collaboration as it is about tools. Interviewers want to see how you handle incidents, work with developers, and drive improvement. 36. **Tell me about the most stressful production incident you handled. What did you learn?** 37. **Describe a time you automated a manual process. What was the impact?** 38. **How do you approach writing postmortems? Give an example of an actionable postmortem you wrote.** 39. **Tell me about a time you had to convince developers to change their workflow for reliability.** 40. **How do you balance speed of delivery with system reliability?** 41. **Describe a situation where you improved the developer experience for your team.** #### Blameless Postmortem Mindset When discussing incidents in interviews, always frame your answers around a blameless culture. Focus on systemic causes ("our monitoring did not catch the issue early enough") rather than individual blame ("a developer pushed bad code"). This signals DevOps maturity. ## How to Practice DevOps interviews reward hands-on experience above all else. Here is how to prepare effectively. - **Build a home lab:** Deploy a Kubernetes cluster, set up CI/CD, configure monitoring-use free tiers - **Get certified:** AWS Solutions Architect or CKA (Certified Kubernetes Administrator) demonstrate baseline competence - **Practice troubleshooting:** Break things on purpose and practice debugging them systematically - **Write IaC:** Build your personal projects using Terraform from day one - **Study incident response:** Read postmortems from major outages (AWS, Google, Cloudflare all publish them) The hardest part of DevOps interviews is explaining complex systems clearly. You might understand Kubernetes networking perfectly, but can you draw it on a whiteboard and explain it to someone who does not? [MORT's Interview Practice](https://mortit.com/features/interview-practice) helps you practice explaining DevOps concepts and scenarios out loud. ## Practice DevOps interviews with AI MORT's Interview Practice includes DevOps-specific questions on CI/CD, cloud architecture, Kubernetes, and incident response. Get feedback on your technical explanations and troubleshooting approach. [Learn About Interview Practice](https://mortit.com/features/interview-practice) [Try a Free Mock Interview](https://app.mortit.com/signup) ## More Interview Resources ### [Software Engineer Interview Questions](https://mortit.com/blog/software-engineer-interview-questions) General SWE questions covering algorithms and system design ### [AI Job Matching](https://mortit.com/features/ai-job-matching) Find roles matched to your skills with AI ### [Complete Interview Prep Guide](https://mortit.com/blog/interview-preparation-guide) Everything you need from research to follow-up