DevOps Interview Questions 2026
58 DevOps interview questions from Accenture, Deloitte, Amazon, TCS, General, Netflix and more. Real questions from Technical, System Design, and HR rounds.
All DevOps Questions
Describe the complete CI/CD pipeline you have implemented in your projects. Walk through every stage from code commit to production deployment, including linting, unit tests, build, artifact storage, staging deploy, integration tests, and release gates.
If a critical issue is found in production, what steps would you take to resolve it quickly? Walk through: immediate triage, deciding between hotfix vs rollback, creating a hotfix branch, fast-track CI pipeline, communication protocol, and post-mortem.
Explain how Prometheus and Grafana work together for monitoring. What are the key metrics you'd track for a Node.js API?
How would you implement blue-green deployment with database migrations?
What is the difference between ENTRYPOINT and CMD in Docker? Explain with examples how they interact when both are specified, and how CMD can be overridden at runtime while ENTRYPOINT cannot easily be replaced.
Your AWS Lambda function runs fine in testing but times out in production on the first invocation. Why?
What is a sidecar proxy and how does it work in service mesh architecture?
What is a service mesh and what problem does it solve that a regular load balancer doesn't?
Explain how connection draining works in load balancers and why it's important for zero-downtime deployments.
Explain Docker layer caching. Why do developers often put COPY . . before RUN npm install (wrong) and how to fix it?
Your CI/CD pipeline takes 45 minutes. How do you reduce it to under 10 minutes?
Explain how you would implement zero-downtime database migrations in a deployment pipeline.
How does Terraform manage state and what happens when two developers run 'terraform apply' simultaneously?
What is Kubernetes horizontal pod autoscaling (HPA) and what metrics can it scale on?
What are the key steps involved in building a Docker image? Explain each Dockerfile instruction (FROM, RUN, COPY, WORKDIR, EXPOSE, CMD), multi-stage builds for smaller images, layer caching best practices, and how to scan images for vulnerabilities.
Your Kubernetes pod keeps crashing with OOMKilled. How do you diagnose and fix it?
Explain blue-green vs canary deployment. When would you choose each?
What stages do you generally include in a Jenkins pipeline to ensure code quality? Walk through each stage: checkout, static analysis (SonarQube/ESLint), unit tests with coverage thresholds, security scanning, build, and artifact publishing.
Explain the difference between Declarative and Scripted pipelines in Jenkins. When would you choose one over the other? Show a code snippet illustrating the structural difference.
You need zero-downtime database schema changes in production. Your service has 50 instances running. How do you add a NOT NULL column to a high-traffic table?
A Docker container is using 100% of its CPU allocation and throttling. The app inside is single-threaded. Adding more CPU limit doesn't help. What's the root cause?
Explain how Helm works in Kubernetes. What problem does it solve that kubectl apply doesn't?
Your CI/CD pipeline takes 45 minutes. Developers complain. Break down how you'd systematically reduce it to under 10 minutes.
You need to run a database migration before deploying your new application version in Kubernetes. How do you handle this safely?
Explain the difference between liveness probe and readiness probe in Kubernetes. What happens if you configure liveness probe too aggressively?
Your Kubernetes deployment has rollingUpdate maxUnavailable:0 and maxSurge:1. A new deployment is stuck at 1/2 pods ready and never completes. What's happening?
Which Git branching strategy do you follow — GitFlow or trunk-based development — and why? Compare release cadence, merge complexity, hotfix handling, and suitability for CI/CD pipelines.
How do you pass environment variables during Docker build and runtime? Compare ARG (build-time) vs ENV (runtime), how to use --build-arg and --env-file, the security implications of baking secrets into layers, and safer alternatives like Docker secrets.
What are Jenkins Shared Libraries and how are they used in Jenkinsfiles? Explain the directory structure, how to import them, and how they help enforce consistency across multiple pipelines in a large organisation.
What is a webhook and how is it used in CI/CD automation? Explain how a GitHub webhook triggers a Jenkins job, the payload structure, how to secure it with a secret token, and how to debug failed webhook deliveries.
Your Docker container works on developer machines but fails in production with 'Permission denied' errors accessing /data volume. All developers use Mac, production runs on Linux. What's the issue?
When two developers push changes to the same file in Git simultaneously, how would you resolve the merge conflict? Walk through: pulling latest, identifying conflict markers (<<<, ===, >>>), choosing which changes to keep, testing after resolution, and committing the merge.
Explain how Kubernetes networking works when Pod A calls Pod B by service name. Trace the exact path of the network packet.
How can Jenkins pipelines be created and triggered automatically? Explain pipeline-as-code with Jenkinsfile in SCM, multibranch pipelines that auto-discover branches, Organization Folders for GitHub orgs, and automatic triggering via webhooks vs SCM polling.
Your Kubernetes cluster nodes are at 80% memory utilization. Adding pods fails with 'Insufficient memory'. You have 10 nodes. Some pods have no resource limits set. What's your investigation and remediation plan?
After deploying a new version in Kubernetes, users report intermittent errors. 30% of requests fail, 70% succeed. Rollback is taking 10 minutes and you need a faster solution right now.
Your CI/CD pipeline builds a Docker image on every commit. Build time is 18 minutes. 15 minutes is just npm install. How do you reduce this without caching all npm packages globally?
Your Kubernetes pod keeps crashing with OOMKilled. You set memory limit to 512Mi. The application normally uses 300Mi but spikes to 600Mi on certain requests. How do you fix this without just raising the limit?
How do you prevent breaking the release branch during development? Discuss branch protection rules, required PR reviews, mandatory status checks, feature flags, and how to use a staging environment as a gate before merging to release.
If a Jenkins job runs but the build does not trigger, what could be the possible reasons? Systematically diagnose: webhook misconfiguration, SCM polling, branch filter mismatch, credential errors, and agent availability.
Have you worked with CI/CD pipelines, and how were they used in your project? Describe the tools used (Jenkins, GitHub Actions, GitLab CI), the stages in your pipeline, how tests were triggered, and how deployments were automated.
Explain the differences between Helm 2 and Helm 3 for Kubernetes package management. What was removed and why?
Explain your deployment workflow starting from code commit until production release. Cover feature branch → PR → CI → merge → staging deploy → smoke tests → canary/blue-green production deploy → monitoring and rollback plan.
Your team merged 3 PRs simultaneously. Production broke. All 3 PRs look fine individually. What's the likely cause and how do you find it?
You need to give a production hotfix in 30 minutes. The bug is causing data corruption. You don't have time for a full review cycle. What's your process?
Your API suddenly starts returning 404 for an endpoint that worked yesterday. No code was deployed. What do you investigate?
Explain the difference between a blue-green deployment and a canary deployment. When would you choose canary over blue-green?
Your Kubernetes cluster is down. Entire production is offline. You have 15 minutes before CEO calls. What do you do?
You deploy a new feature on Friday. Monday morning, your boss says 'sales dropped 30% over the weekend.' How do you investigate whether your deployment caused it?
Explain the difference between active-passive and active-active database configurations.
Your Kubernetes cluster has nodes running at 95% CPU. New pods are in Pending state. How do you resolve this?
What is GitOps and how does ArgoCD implement it?
What is the difference between monitoring and observability? Give a concrete example of a production issue that good monitoring alone would miss but observability would catch.
How does HashiCorp Vault work for secret management? How do you integrate it with Kubernetes?
Explain Kubernetes Deployments vs StatefulSets. When would you use a StatefulSet?
Why do most teams prefer Terraform over manually configuring cloud infrastructure through the console, even for a small project? Name a concrete risk manual configuration introduces.
Explain feature flags and how you use them for A/B testing and safe deployments.
Explain OpenTelemetry. How does it unify traces, metrics, and logs?
Practice these questions with AI feedback
Get instant grading on your answers, identify your weak areas, and generate a personalised 14-day study plan — all free.
Build my study plan →