110+ DevOps Interview Questions for Freshers (2027)

114 DevOps interview questions for freshers with short answers: DevOps basics, Linux, networking, Git, CI/CD, Docker, Kubernetes, cloud and Terraform.

Sep 6, 2025 - 13:44
Nov 6, 2026 - 22:07
 0  137
110+ DevOps Interview Questions for Freshers (2027)

DevOps interviews for freshers check whether you understand the basics behind each tool: what DevOps is, Linux and networking fundamentals, Git, CI/CD, Docker, Kubernetes, cloud and infrastructure as code. This page has 114 short questions with plain answers, written for students and career switchers preparing for a first DevOps role.

Answers were checked against official documentation (git-scm.com, docs.docker.com, kubernetes.io, developer.hashicorp.com and the cloud providers) in November 2026. If you already have production experience and want scenario answers from real work, use our practical DevOps interview questions with real-time answers instead. This page sticks to definitions and fundamentals.

Key takeaways

  • Fresher rounds test definitions first, then ask "how would you do it" on a small task. Be ready to type basic Linux, Git and Docker commands.
  • Explain each tool by the problem it solves: Git tracks changes, CI tests every change, Docker packages an app, Kubernetes runs containers across machines.
  • Linux and networking basics come up in almost every round. Know permissions, processes, ports, DNS and HTTP status codes.
  • Interviewers value a small project you built and can explain over a long list of tools you have only read about.
  • When you do not know an answer, say what you would check. That counts for more than a guess.

How to use this list

SectionQuestionsPractise with
DevOps concepts1 to 14Explain the DevOps lifecycle on a whiteboard
Linux15 to 30A free Linux VM or WSL
Networking31 to 40curl, dig, ss
Git41 to 52A GitHub or GitLab repo
CI/CD53 to 63GitHub Actions or Jenkins
Docker64 to 75Docker Desktop or Docker Engine
Kubernetes76 to 87kind or minikube
Cloud, IaC, monitoring, scripting88 to 104A cloud free tier and Terraform
Stretch and scenario questions105 to 114Your own project

For a one-page shortlist, see the 20 most common DevOps interview questions. For the full topic hub, see the 200+ DevOps interview questions guide.

Freshers: DevOps concepts

1. What is DevOps?

DevOps is a way of working where development and operations share responsibility for building, releasing and running software. Teams automate builds, tests and deployments so they can release small changes often and fix problems quickly. Read more in what is DevOps.

2. Why do companies adopt DevOps?

To release changes faster and with fewer failures. Automation removes manual handoffs, and shared ownership means the people who write code also see how it behaves in production.

3. What are the stages of the DevOps lifecycle?

Plan, code, build, test, release, deploy, operate and monitor, with feedback from monitoring going back into planning. It is usually drawn as an infinity loop.

4. What is the difference between Agile and DevOps?

Agile is about how a team plans and builds software in short iterations. DevOps extends that to how the software is delivered and run. Agile teams often use DevOps practices to ship what each sprint builds.

5. What is continuous integration?

Developers merge code into a shared branch often, and every merge triggers an automated build and tests. Problems show up within minutes instead of weeks later.

6. What is continuous delivery?

Every change that passes the pipeline is ready to release, and a person decides when to push it to production with one action.

7. What is continuous deployment?

Every change that passes the pipeline goes to production automatically, with no manual approval step.

8. What is infrastructure as code?

Defining servers, networks and other infrastructure in files that are versioned in Git and applied by a tool such as Terraform. The same file creates the same environment every time.

9. What does "shift left" mean?

Moving testing and security checks earlier in the development process, for example running security scans in the pipeline instead of after release.

10. What is DevSecOps?

Adding security practices into every stage of DevOps: scanning code and dependencies, scanning container images, managing secrets properly and checking infrastructure code.

11. What are the DORA metrics?

Measures from the DevOps Research and Assessment program: deployment frequency, lead time for changes, change failure rate and failed deployment recovery time. They show both speed and stability.

12. What does a DevOps engineer do day to day?

Builds and maintains CI/CD pipelines, manages infrastructure through code, supports containers and Kubernetes, sets up monitoring, and helps developers ship and troubleshoot. The mix depends on the company.

13. What is the difference between a monolith and microservices?

A monolith is one application deployed as a single unit. Microservices split the application into small services that are deployed separately and talk over the network. Microservices allow independent releases but add network and monitoring complexity.

14. What is a blue-green deployment?

You run two identical environments. The new version goes to the idle one, you test it, then switch traffic over. If something breaks, you switch back.

Freshers: Linux basics

15. Why is Linux important for DevOps?

Most servers, containers and cloud instances run Linux, and most DevOps tools are built for it. You will use the command line every day.

16. How do you list files including hidden ones with details?

ls -la. Hidden files start with a dot, and -l shows permissions, owner, size and date.

17. What do the permissions rwxr-xr-- mean?

The owner can read, write and execute; the group can read and execute; others can only read. In octal that is 754.

18. How do you change file permissions and ownership?

chmod 640 file changes permissions and chown user:group file changes the owner and group.

19. How do you see running processes?

ps aux lists them and top or htop shows them live with CPU and memory use.

20. How do you stop a process?

kill <pid> sends SIGTERM so the process can exit cleanly. kill -9 <pid> sends SIGKILL, which cannot be caught, so use it last.

21. How do you check disk space and folder size?

df -h shows free space per filesystem and du -sh /path shows how much a folder uses.

22. How do you check memory usage?

free -h. Look at the "available" column, which includes memory the kernel can reclaim from cache.

23. How do you search for text in files?

grep -rn "error" /var/log/app searches recursively and shows line numbers.

24. How do you follow a log file as it grows?

tail -f /var/log/app.log. For systemd services, use journalctl -u service-name -f.

25. How do you start, stop and enable a service?

With systemd: systemctl start nginx, systemctl stop nginx, and systemctl enable nginx so it starts at boot.

26. What is the difference between a hard link and a soft link?

A hard link is another name for the same file data and survives if the original name is deleted. A soft (symbolic) link points to a path and breaks if the target is removed. Create one with ln -s target link.

27. What is the root user?

The superuser with full control of the system. Use sudo to run single commands as root instead of logging in as root.

28. How do you install a package?

On RHEL, Fedora and similar: dnf install nginx. On Debian and Ubuntu: apt install nginx.

29. What is an environment variable?

A named value available to processes, such as PATH or HOME. Set one with export APP_ENV=dev and read it with echo $APP_ENV.

30. What does the pipe | do?

It sends the output of one command into the next, for example ps aux | grep nginx.

Freshers: networking basics

31. What is an IP address?

A number that identifies a device on a network. IPv4 addresses look like 192.168.1.10; IPv6 addresses are longer and written in hexadecimal.

32. What is DNS?

The Domain Name System turns names like example.com into IP addresses. Check a lookup with dig example.com or nslookup.

33. What is the difference between TCP and UDP?

TCP sets up a connection and guarantees ordered delivery, used by HTTP and SSH. UDP sends packets without a connection or delivery guarantee, used by DNS queries and streaming.

34. Name some common ports.

SSH 22, HTTP 80, HTTPS 443, DNS 53, MySQL 3306 and PostgreSQL 5432.

35. What is the difference between HTTP and HTTPS?

HTTPS is HTTP over TLS, so traffic is encrypted and the server proves its identity with a certificate.

36. What do HTTP status codes 200, 301, 404 and 500 mean?

200 is success, 301 is a permanent redirect, 404 means not found and 500 is a server error. 4xx codes are client errors and 5xx codes are server errors.

37. What is a load balancer?

A component that spreads incoming traffic across several servers and stops sending traffic to servers that fail health checks.

38. What is a firewall?

A filter that allows or blocks traffic based on rules such as port, protocol and source address. In the cloud, security groups play this role.

39. How do you check which ports are listening on a server?

ss -tulpn lists listening TCP and UDP ports with the process that owns them.

40. What is a subnet?

A range of IP addresses within a network, written in CIDR form such as 10.0.1.0/24, which holds 256 addresses.

Freshers: Git and version control

41. What is Git?

A distributed version control system. Every developer has a full copy of the repository history and can commit locally.

42. What is the difference between Git and GitHub?

Git is the tool. GitHub (like GitLab and Bitbucket) is a hosting service for Git repositories that adds pull requests, issues and CI.

43. What does git clone do?

It copies a remote repository, including its history, to your machine.

44. Explain the working directory, staging area and repository.

You edit files in the working directory, choose changes for the next commit with git add (the staging area), and save them with git commit into the repository history.

45. What is the difference between git fetch and git pull?

git fetch downloads new commits without changing your branch. git pull fetches and then merges (or rebases) them into your current branch.

46. What is a branch?

A movable pointer to a commit. Developers create branches for features or fixes and merge them when ready. Create and switch with git switch -c feature-x.

47. What is a merge conflict and how do you fix it?

Git cannot combine two changes to the same lines automatically. Open the file, choose the correct content between the conflict markers, then git add and commit.

48. What is the difference between merge and rebase?

Merge joins branches with a merge commit and keeps history as it happened. Rebase replays your commits on top of another branch for a straight history. Do not rebase commits others already use.

49. How do you undo the last commit?

git reset --soft HEAD~1 undoes it and keeps the changes staged. If the commit is already pushed, use git revert <commit>, which adds a new commit that reverses it.

50. What is .gitignore?

A file listing patterns Git should not track, such as build output, logs and local secrets.

51. What is a pull request?

A request to merge a branch, where teammates review the change and CI runs before merging. GitLab calls it a merge request.

52. What does git stash do?

It saves uncommitted changes and cleans the working directory so you can switch tasks. Bring them back with git stash pop.

Freshers: CI/CD

53. What is a CI/CD pipeline?

An automated sequence of steps that builds, tests and deploys code each time it changes, usually triggered by a push or pull request.

54. Name some CI/CD tools.

Jenkins, GitHub Actions, GitLab CI/CD, Azure Pipelines and AWS CodePipeline.

55. What is Jenkins?

An open source automation server for building pipelines. Pipelines are written as code in a Jenkinsfile stored in the repository.

56. What is a Jenkinsfile?

A text file that defines a Jenkins pipeline, with stages such as build, test and deploy, written in declarative or scripted syntax.

pipeline {
  agent any
  stages {
    stage('Build') { steps { sh 'mvn -B package' } }
    stage('Test')  { steps { sh 'mvn test' } }
  }
}

57. What is GitHub Actions?

GitHub's built-in CI/CD. Workflows are YAML files in .github/workflows/ that run jobs on events such as push or pull request.

58. What is a build artifact?

The output of a build, such as a JAR file, a binary or a container image, stored so later stages deploy exactly what was tested.

59. What is an artifact repository?

A store for build outputs and dependencies, such as JFrog Artifactory, Sonatype Nexus or a container registry.

60. What types of tests run in a pipeline?

Unit tests, integration tests, end-to-end tests, and often static code analysis and security scans.

61. What is a pipeline trigger?

The event that starts a pipeline, such as a push, a pull request, a schedule or a manual run.

62. Why should you not store passwords in pipeline files?

Anyone with repository access could read them, and they stay in Git history. Use the CI tool's secret store or a secrets manager.

63. What is a rollback?

Returning to the previous working version after a bad release, ideally with one command or one pipeline run.

Freshers: Docker and containers

64. What is a container?

A process that runs with its own filesystem, network and resource limits, isolated from other processes on the same host using Linux namespaces and cgroups.

65. How is a container different from a virtual machine?

A VM runs a full guest operating system on a hypervisor. Containers share the host kernel, so they start faster and use less memory.

66. What is Docker?

A platform for building, sharing and running containers. See what Docker is and why DevOps teams use it.

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

An image is a read-only template. A container is a running instance of an image with a writable layer on top.

68. What is a Dockerfile?

A text file with instructions for building an image.

FROM python:3.12-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
CMD ["python", "app.py"]

69. Name basic Docker commands.

docker build -t app ., docker run -d -p 8080:80 app, docker ps, docker logs <id>, docker stop <id> and docker images.

70. What is the difference between CMD and ENTRYPOINT?

ENTRYPOINT sets the main command. CMD gives default arguments, or the default command when there is no ENTRYPOINT, and is replaced by arguments passed to docker run.

71. What is a Docker volume?

Storage managed by Docker that keeps data after a container is removed, for example a database's data folder.

72. What is Docker Compose?

A tool that runs multi-container apps from a compose.yaml file with docker compose up.

73. What is a container registry?

A service that stores images, such as Docker Hub, Amazon ECR, Azure Container Registry or GitHub Container Registry.

74. What does -p 8080:80 mean?

It maps port 8080 on the host to port 80 inside the container.

75. How do you make an image smaller?

Use a slim base image, combine steps, clean package caches and use multi-stage builds so build tools stay out of the final image.

Freshers: Kubernetes basics

76. What is Kubernetes?

An open source platform that runs and manages containers across a cluster of machines: scheduling, scaling, restarting and networking them.

77. What is a pod?

The smallest deployable unit in Kubernetes: one or more containers that share network and storage and are scheduled together.

78. What is a node?

A worker machine, virtual or physical, that runs pods. The control plane decides which pods run on which node.

79. Name the main control plane components.

kube-apiserver, etcd, kube-scheduler and kube-controller-manager, plus cloud-controller-manager in cloud setups.

80. What is a Deployment?

An object that keeps a set number of identical pods running and rolls out new versions gradually.

81. What is a Service?

A stable network address for a set of pods. Types include ClusterIP (internal), NodePort and LoadBalancer.

82. What is a namespace?

A way to divide one cluster into separate groups of resources, for example per team or per environment.

83. What is the difference between a ConfigMap and a Secret?

Both pass configuration to pods. ConfigMaps hold non-sensitive data. Secrets hold sensitive data; they are base64 encoded, not encrypted by default, so enable encryption at rest and restrict access.

84. What does kubectl get pods show?

The pods in the current namespace with their status, restarts and age. Add -A for all namespaces.

85. How do you see why a pod is failing?

kubectl describe pod <name> for events and kubectl logs <name> for container output. Add --previous to see logs from the last crashed container.

86. What is a liveness probe and a readiness probe?

A liveness probe tells Kubernetes when to restart a container. A readiness probe tells it when the container can receive traffic.

87. How do you scale a Deployment?

kubectl scale deployment web --replicas=5, or automatically with a HorizontalPodAutoscaler based on CPU or other metrics.

Freshers: cloud, IaC, monitoring and scripting

88. What is cloud computing?

Renting computing resources such as servers, storage and databases from a provider over the internet and paying for what you use.

89. What are IaaS, PaaS and SaaS?

IaaS gives you virtual machines and networks (Amazon EC2). PaaS runs your code without managing servers (Azure App Service). SaaS is a finished application you use (Gmail).

90. Name the three largest public cloud providers.

Amazon Web Services, Microsoft Azure and Google Cloud. Compare their DevOps tools in AWS vs Azure vs GCP DevOps tools.

91. What is a region and an availability zone?

A region is a geographic area. Availability zones are separate data centre groups within a region, so you can spread an app across them to survive one failing.

92. What is IAM?

Identity and Access Management: controlling who can do what with cloud resources through users, roles and policies.

93. What is object storage?

Storage for files as objects with metadata, accessed over HTTP, such as Amazon S3 or Azure Blob Storage.

94. What is serverless?

Running code without managing servers; the provider runs it on demand and bills per use, as with AWS Lambda or Azure Functions.

95. What is Terraform?

An infrastructure as code tool from HashiCorp. You describe resources in HCL files and run terraform plan to preview and terraform apply to create them.

96. What is Terraform state?

A file that records which real resources Terraform manages. Teams keep it in remote storage with locking so two people do not change it at once.

97. What is Ansible?

An agentless configuration management tool that connects over SSH and runs tasks defined in YAML playbooks.

98. What is the difference between Terraform and Ansible?

Terraform mainly creates and changes infrastructure. Ansible mainly configures servers and deploys software on them. Many teams use both.

99. What is monitoring?

Collecting metrics, logs and checks so you know when a system is unhealthy. Common tools are Prometheus, Grafana and the ELK Stack.

100. What is the difference between monitoring and observability?

Monitoring watches known signals and alerts on them. Observability means you can ask new questions about system behaviour from metrics, logs and traces. More in observability vs monitoring.

101. What are metrics, logs and traces?

Metrics are numbers over time, logs are event records, and traces follow one request through several services.

102. Which scripting languages should a DevOps fresher know?

Bash for Linux automation and Python for more complex scripts and API calls.

103. Write a Bash loop that pings three servers.

for host in web1 web2 web3; do
  ping -c 1 "$host" > /dev/null && echo "$host up" || echo "$host down"
done

104. What is YAML and where is it used in DevOps?

A human-readable data format that uses indentation. Kubernetes manifests, Ansible playbooks, Docker Compose files and most CI pipelines use it. Indentation errors are a common cause of failures.

Stretch questions (2 to 5 years level)

Interviewers sometimes push a strong fresher with questions usually asked of experienced engineers. Short, honest answers are enough.

105. How would you deploy without downtime on Kubernetes?

Use a Deployment with a rolling update strategy, readiness probes so traffic only reaches ready pods, and enough replicas to keep serving while old pods stop.

106. How do you keep secrets out of Git?

Store them in a secrets manager such as HashiCorp Vault or a cloud secrets service, inject them at runtime, add secret scanning to the pipeline, and rotate anything that leaks.

107. What is GitOps?

Using Git as the source of truth for what should run, with a tool such as Argo CD or Flux syncing the cluster to match the repository.

Senior-level questions freshers may hear

108. How would you design a CI/CD pipeline for a microservices app?

One pipeline per service that builds, tests and scans, pushes a versioned image, deploys to a test environment, then promotes to production with approvals or automated checks. Shared steps live in templates.

109. How do you decide what to monitor first?

Start with what users feel: latency, traffic, errors and saturation for each service, and alert on those before adding detailed internal metrics.

Scenario questions for freshers

110. Your pipeline fails at the test stage. What do you do?

Read the log to find the failing test, run it locally, check what changed in the last commit, and fix the code or the test. Do not skip the stage to get green.

111. A container exits right after starting. How do you investigate?

Run docker ps -a to see the exit code and docker logs <id> for the error. Common causes are a wrong command, missing environment variables or a missing file.

112. A pod is in CrashLoopBackOff. What are your first steps?

Run kubectl describe pod for events and kubectl logs --previous for the last crash output. Check the image, environment variables, config and resource limits.

113. A website returns 502 Bad Gateway. What does it suggest?

The proxy or load balancer could not get a valid response from the backend. Check that the backend is running, listening on the expected port and passing health checks.

114. You pushed a password to GitHub by mistake. What do you do?

Treat it as leaked: change the password or revoke the key first, then remove it from history with a tool such as git filter-repo and tell your team. Add a secret scanner to prevent a repeat.

How to prepare as a fresher

  1. Build one small project end to end: a web app in Git, a pipeline that tests it, a Docker image and a deployment to kind or a cloud free tier.
  2. Practise the Linux and Git commands above until you can type them without notes.
  3. Explain your project out loud in three minutes, including one thing that broke and how you fixed it.
  4. Read the official docs for each tool you list on your CV.

For project ideas, see DevOps project ideas for freshers. Our DevOps training covers these topics with labs, in the Kharadi, Pune classroom and live online.

Frequently asked questions

What DevOps questions are asked to freshers?

Mostly definitions and basics: what DevOps and CI/CD are, Linux commands, Git workflow, Docker images and containers, Kubernetes pods and services, and cloud basics, plus one or two simple troubleshooting scenarios.

How is this page different from the practical DevOps interview questions page?

This page covers fundamentals and definitions for freshers. The practical questions page covers real-time scenarios for people who already work with these tools.

Which tools should a DevOps fresher learn first?

Linux, Git, one CI tool such as GitHub Actions or Jenkins, Docker, basic Kubernetes and one cloud provider. Add Terraform once those feel comfortable.

Do DevOps fresher interviews include coding?

Often a little: a Bash or Python script to process a file or check a service. Complex algorithms are less common than in software developer interviews.

Is Kubernetes required for a fresher DevOps job?

Basic knowledge is expected in many interviews: pods, Deployments, Services and kubectl commands for troubleshooting. Deep cluster administration is not usually expected.

How should I answer a question I do not know?

Say you have not used it, then explain how you would find out or what related thing you do know. Interviewers prefer that to a confident wrong answer.

References

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Angry Angry 0
Sad Sad 0
Wow Wow 0
Mridul I am a passionate technology enthusiast with a strong focus on DevOps, Cloud Computing, and Cybersecurity. Through my blogs at DevOps Training Institute, I aim to simplify complex concepts and share practical insights for learners and professionals. My goal is to empower readers with knowledge, hands-on tips, and industry best practices to stay ahead in the ever-evolving world of DevOps.