๐Ÿ‡ฎ๐Ÿ‡ณ
๐Ÿ‡ฎ๐Ÿ‡ณ
Limited-Time Offer!Get 20% OFF on all live courses
Enroll Now
PrakalpanaLive online tech training
DevOpsโฑ๏ธ 15 min read๐Ÿ“… Oct 1

Top 40 DevOps Interview Questions and Answers (2026) โ€” Freshers to Experienced

SK
Sanjay Kulkarniโ€ขDevOps Engineer
๐Ÿ“‘ Contents (52 sections)

๐Ÿ“ŒHow DevOps Interviews Work in 2026

Most DevOps interviews in India and abroad follow the same shape: a screening call, one or two technical rounds on tools and troubleshooting, a hands-on or scenario round (fix a broken pipeline, debug a failing pod), and a final round on system design and past projects. These questions are grouped by area so you can revise systematically.

Want mock interviews with a working DevOps engineer? They are part of our live DevOps course.

๐Ÿ“ŒGeneral DevOps Questions

1. What is DevOps?

DevOps is a set of practices and a culture that brings development and operations together to deliver software faster and more reliably, through automation (CI/CD, infrastructure as code), shared ownership and continuous feedback from monitoring.

2. What is the difference between Continuous Delivery and Continuous Deployment?

In Continuous Delivery, every change is automatically built, tested and made ready to release, but a human approves the production deploy. In Continuous Deployment, every change that passes the pipeline goes to production automatically.

3. What are the DORA metrics?

Deployment frequency, lead time for changes, change failure rate and time to restore service. They are the standard way to measure DevOps performance.

4. What is the difference between DevOps and SRE?

DevOps is a culture and set of practices; SRE is a concrete implementation of it that applies software engineering to operations, using SLOs and error budgets. See DevOps vs SRE vs Platform Engineer.

๐Ÿ“ŒLinux and Networking

5. How do you find which process is using a port?

ss -tulpn | grep :8080 or lsof -i :8080.

6. A server is slow. How do you troubleshoot?

Check load and CPU with top/htop, memory with free -m, disk with df -h and iostat, then logs with journalctl and application logs. Work from symptoms to the resource that is saturated.

7. What happens when you type a URL in the browser?

DNS resolution, TCP handshake, TLS handshake, HTTP request, load balancer, application server, response, rendering. Interviewers use this to test networking depth.

A hard link is another name for the same inode; a soft (symbolic) link is a pointer to a path and breaks if the target is removed.

9. How do you schedule a recurring job?

With cron (crontab -e) or a systemd timer.

๐Ÿ“ŒGit

10. What is the difference between git merge and git rebase?

Merge creates a merge commit and preserves history as it happened; rebase rewrites your commits on top of the target branch for a linear history. Never rebase shared public branches.

11. How do you undo a commit that is already pushed?

Use git revert , which creates a new commit that reverses it, instead of rewriting shared history.

12. What is trunk-based development?

Developers merge small changes into a single main branch frequently, using feature flags for incomplete work. It pairs naturally with CI/CD.

๐Ÿ“ŒCI/CD (Jenkins and GitHub Actions)

13. What are the typical stages of a CI/CD pipeline?

Checkout, build, unit test, static analysis, build artifact or image, security scan, push to registry, deploy to staging, integration tests, approval, deploy to production.

14. Declarative vs scripted Jenkins pipelines?

Declarative pipelines use a structured, opinionated syntax and are easier to read and validate; scripted pipelines are full Groovy and more flexible.

15. How do you store secrets in a pipeline?

Never in code. Use the CI tool's secret store (Jenkins credentials, GitHub Actions secrets) or an external vault (HashiCorp Vault, AWS Secrets Manager), and prefer short-lived credentials via OIDC.

16. What is a blue-green deployment?

Two identical environments; traffic switches from the old (blue) to the new (green) in one step, with instant rollback by switching back.

17. What is a canary deployment?

Release the new version to a small percentage of users, watch metrics, then gradually increase traffic.

๐Ÿ“ŒDocker

18. What is the difference between an image and a container?

An image is a read-only template made of layers; a container is a running instance of an image with a writable layer.

19. What is a multi-stage build and why use it?

Using several FROM stages in one Dockerfile so build tools stay in an early stage and only the runtime artifact is copied into a small final image. It reduces size and attack surface.

20. CMD vs ENTRYPOINT?

ENTRYPOINT defines the executable; CMD provides default arguments that can be overridden at docker run.

21. How do you make Docker images smaller?

Slim or distroless base images, multi-stage builds, fewer layers, a .dockerignore file and cleaning package caches in the same layer.

22. How do containers communicate?

Through Docker networks; on a user-defined bridge network, containers resolve each other by name.

๐Ÿ“ŒKubernetes

23. Explain the Kubernetes architecture.

The control plane (API server, etcd, scheduler, controller manager) and worker nodes (kubelet, kube-proxy, container runtime) running pods.

24. Deployment vs StatefulSet?

Deployments manage interchangeable stateless pods; StatefulSets give pods stable identities and persistent storage, for databases and similar workloads.

25. What are the Service types?

ClusterIP (internal), NodePort, LoadBalancer and ExternalName. Ingress sits on top for HTTP routing.

26. A pod is in CrashLoopBackOff. What do you do?

kubectl describe pod for events, kubectl logs --previous for the crashed container's logs, then check config, environment variables, probes and resource limits.

27. Liveness vs readiness probes?

A failing liveness probe restarts the container; a failing readiness probe removes the pod from service endpoints without restarting it.

28. How does the Horizontal Pod Autoscaler work?

It scales the number of replicas based on metrics such as CPU, memory or custom metrics, within min and max limits.

29. What is Helm?

A package manager for Kubernetes that templates manifests into versioned, reusable charts.

๐Ÿ“ŒTerraform and Ansible

30. What is Terraform state and why store it remotely?

State maps your configuration to real resources. Remote state (for example S3 with DynamoDB locking) lets a team share it safely and prevents concurrent changes.

31. What does terraform plan do?

It shows what will be created, changed or destroyed without making changes โ€” review it in CI before every apply.

32. Terraform vs Ansible?

Terraform provisions infrastructure declaratively; Ansible configures software on existing servers. Many teams use both.

33. What is idempotency?

Running the same operation many times produces the same result. Both Terraform and well-written Ansible playbooks are idempotent.

๐Ÿ“ŒAWS and Cloud

34. Security group vs NACL?

Security groups are stateful and attached to instances; NACLs are stateless and attached to subnets.

35. How do you design a highly available web app on AWS?

Multiple availability zones, an Application Load Balancer, an auto scaling group or EKS, a Multi-AZ RDS database, S3 for static assets and CloudFront in front.

36. How do you give a pod or EC2 instance access to S3 without keys?

IAM roles โ€” instance profiles for EC2, IAM Roles for Service Accounts (IRSA) or Pod Identity for EKS.

๐Ÿ“ŒMonitoring and Reliability

37. Monitoring vs observability?

Monitoring tells you when known things break; observability (metrics, logs and traces together) lets you ask new questions about why.

38. What are SLIs, SLOs and error budgets?

An SLI is a measured indicator (for example, request success rate), an SLO is the target (99.9%), and the error budget is the allowed failure (0.1%) that balances reliability against release speed.

39. How does Prometheus collect metrics?

It pulls (scrapes) metrics over HTTP from targets on a schedule and stores them as time series, with alerting rules sent to Alertmanager.

๐Ÿ“ŒScenario Question

40. Production is down after a deployment. Walk me through it.

Stabilise first: roll back or shift traffic. Then communicate, check dashboards and logs to confirm recovery, find the root cause, and write a blameless post-mortem with action items such as a missing test, an alert or a canary step.

๐Ÿ“ŒHow to Prepare

  • Build and explain one end-to-end pipeline project in detail โ€” it carries the interview
  • Practise troubleshooting live: break your own cluster and fix it
  • Revise with our DevOps roadmap
  • Prakalpana's DevOps Engineering course includes DevOps and SRE mock interviews with working engineers, live online or 1-on-1. WhatsApp or call +91 9243078181 for a free demo.

    SK

    Written by

    Sanjay Kulkarni

    DevOps Engineer

    ๐Ÿš€ Master DevOps

    Live online + 1-on-1 DevOps Engineering training ยท Join 5000+ developers