Phone Number: +91 72599 12345
Career Guidance

Top 20 DevOps Interview Questions and Answers for 2026 (Bangalore)

The 20 DevOps interview questions Bangalore employers ask most, with concise answers across Linux, Git, Docker, Kubernetes, CI/CD, Ansible and Terraform.

Preparing for a DevOps interview in Bangalore? Most first-round interviews for DevOps engineer roles at IT services companies, startups and product teams follow the same pattern: Linux and Git basics, then Docker and Kubernetes, then CI/CD, configuration management and infrastructure as code, and finally a scenario about something breaking in production. The questions below are the ones our trainers hear most often from learners returning from interviews, grouped the way interviewers usually ask them, with concise answers you can build on.

Linux and fundamentals

1. How do you check which process is using a port on a Linux server?

Use ss -tulnp | grep :PORT (or netstat -tulnp on older systems) to find the PID, then ps -p PID -o comm,args to identify the process. Interviewers follow up by asking how you would free the port safely, so mention checking what the service is before killing it.

2. What is the difference between a process and a daemon, and how do you manage services?

A daemon is a background process that starts at boot and has no controlling terminal. On systemd systems you manage them with systemctl start|stop|status|enable and read logs with journalctl -u service.

3. How do file permissions work, and what does chmod 755 mean?

Permissions are read (4), write (2) and execute (1) for owner, group and others. 755 gives the owner full access and everyone else read and execute, which is typical for scripts and directories.

Git and source control

4. Explain the difference between git merge and git rebase.

Merge preserves history by creating a merge commit; rebase rewrites your commits on top of another branch for a linear history. Teams usually rebase local feature branches before opening a pull request and merge into main.

5. How do you undo a commit that has already been pushed?

Use git revert COMMIT to create a new commit that reverses it. Avoid git reset --hard followed by a force push on shared branches, because it rewrites history others depend on.

6. What is a Git branching strategy you have used?

Describe either GitFlow (feature, develop, release, hotfix branches) or trunk-based development with short-lived feature branches and feature flags. Explain why your team chose it and how it connects to the CI pipeline.

Docker and containers

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

An image is a read-only template built from a Dockerfile; a container is a running instance of that image with a writable layer. One image can run as many containers.

8. How do you reduce the size of a Docker image?

Use a minimal base image (alpine or distroless), multi-stage builds so build tools stay out of the final image, combine RUN steps to reduce layers, and add a .dockerignore file.

9. How do containers on the same host communicate, and how do you persist data?

User-defined bridge networks give containers DNS by name; Docker Compose does this automatically. Persist data with named volumes or bind mounts, never inside the container’s writable layer.

Kubernetes

10. Explain Pods, Deployments and Services.

A Pod is the smallest deployable unit (one or more containers sharing network and storage). A Deployment manages replica Pods and rolling updates. A Service gives Pods a stable virtual IP and DNS name, with ClusterIP, NodePort and LoadBalancer types for different exposure levels.

11. A Pod is stuck in CrashLoopBackOff. What do you check?

kubectl describe pod for events, kubectl logs --previous for the last crash output, then look at the container’s command, environment variables, ConfigMaps/Secrets, resource limits and liveness probe settings.

12. How do ConfigMaps differ from Secrets, and how do you do a rolling update?

Both inject configuration; Secrets are base64-encoded and intended for sensitive values with tighter RBAC. A rolling update happens when you change the Deployment’s image; kubectl rollout status and kubectl rollout undo manage it.

CI/CD with Jenkins

13. Describe a CI/CD pipeline you built end to end.

Interviewers want the sequence: a Git push triggers Jenkins via webhook, the pipeline checks out code, runs unit tests, builds a Docker image, pushes it to a registry, deploys to a Kubernetes namespace and runs a smoke test. Mention how credentials are stored and how failures are notified.

14. What is the difference between a freestyle job and a pipeline (Jenkinsfile)?

Freestyle jobs are configured in the UI; pipelines are defined as code in a Jenkinsfile stored with the application, which makes them versioned, reviewable and reproducible. Declarative syntax is preferred for readability.

Configuration management and infrastructure as code

15. What problem does Ansible solve, and what makes a playbook idempotent?

Ansible configures many servers consistently over SSH without agents. Idempotency means running the playbook twice produces the same state; Ansible modules achieve this by checking current state before changing anything.

16. How does Terraform manage state, and why does it matter?

Terraform records what it created in a state file so it can plan changes. In teams the state is stored remotely (for example in S3 with DynamoDB locking) to prevent concurrent changes and keep secrets out of local machines.

17. Ansible versus Terraform: when do you use which?

Terraform provisions infrastructure (servers, networks, clusters); Ansible configures what runs on it (packages, files, services). Many teams use Terraform to create instances and Ansible, or container images, to configure them.

Monitoring and production scenarios

18. The application is slow in production. How do you investigate?

Start with monitoring dashboards (CPU, memory, disk, network, error rates), check recent deployments, read application and system logs, look at database and external dependency latency, and reproduce in a lower environment. Explain what you would roll back and when.

19. What do you monitor with Nagios or similar tools, and how do you avoid alert fatigue?

Host and service health, disk and memory thresholds, HTTP endpoints and certificate expiry. Avoid fatigue by alerting on symptoms users feel, setting sensible thresholds and escalation, and reviewing noisy alerts regularly.

20. What is the difference between DevOps and SRE?

DevOps is a culture and set of practices to shorten the delivery cycle; SRE is Google’s implementation that applies software engineering to operations with concepts like SLOs and error budgets. In Bangalore job descriptions the titles often overlap.

How to prepare

  • Build one complete pipeline you can draw on a whiteboard and explain line by line; this single project answers questions 13, 14 and most scenario rounds.
  • Keep your Terraform, Dockerfiles and Jenkinsfile in a public GitHub repository and put the link on your resume.
  • Practise the “something is broken” questions out loud; interviewers assess your troubleshooting order more than the final answer.
  • Know the salary range you are targeting: entry-level DevOps engineers in Bangalore are typically reported at ₹5–9 LPA, rising to ₹15–25 LPA with experience (Glassdoor and Naukri).

If you want structured practice, the DevOps course in Bangalore at MNP Technologies covers Git, Docker, Kubernetes, Jenkins, Ansible, Nagios and Terraform in live labs and includes mock technical interviews based on exactly these questions.