DevOps Interview Questions for Freshers: Linux, Git, Jenkins, Docker & Kubernetes
DevOps interview questions for freshers usually test practical basics: Linux commands, Git workflows, Jenkins pipelines, Docker containers, Kubernetes objects, Terraform, Ansible and troubleshooting scenarios. You do not need senior-level production experience, but you should understand what each tool does and how you would investigate common failures. If you are still learning the full path, visit DevOps Training in Vizag.
This guide gives beginner-friendly answers. Do not memorize blindly. Practise commands, build small projects and explain your work clearly.
Linux Interview Questions
1. What command shows the current directory?
pwd prints the current working directory.
2. How do you list files including hidden files?
Use ls -la. Hidden files start with a dot.
3. How do Linux permissions work?
Permissions are read, write and execute for user, group and others. chmod changes permissions.
4. How do you check running processes?
Use ps aux, top or htop if installed.
5. How do you check a service status?
Use systemctl status service-name on systemd systems.
6. Where do you check logs?
Common locations include /var/log, application log folders and journalctl.
7. Which commands help network troubleshooting?
ping, curl, ss, netstat, dig and traceroute.
8. What is SSH?
SSH is a secure protocol used to log into remote servers. DevOps engineers use it for server access and troubleshooting.
For deeper Linux fundamentals, see Linux Administration Training in Vizag.
Git & GitHub Questions
9. What is a repository?
A repository stores project files and version history.
10. What does clone mean?
git clone copies a remote repository to your local machine.
11. What is a commit?
A commit records a snapshot of changes with a message.
12. What is push?
git push sends local commits to a remote repository.
13. What is pull?
git pull fetches remote changes and merges them locally.
14. Why use branches?
Branches allow developers to work on features or fixes without disturbing the main code.
15. What is a merge conflict?
A conflict happens when Git cannot automatically combine changes. You must edit the conflicted files and commit the resolution.
16. What is a pull request?
A pull request asks team members to review and merge code changes.
Jenkins & CI/CD Questions
17. What is CI?
Continuous Integration means regularly merging code and automatically building or testing it.
18. What is CD?
Continuous Delivery or Deployment automates release steps so software can be deployed reliably.
19. What is a Jenkins job?
A Jenkins job defines automated steps such as pulling code, building, testing or deploying.
20. What is a pipeline?
A pipeline is a sequence of stages such as build, test, package and deploy.
21. What is a Jenkinsfile?
A Jenkinsfile stores pipeline code inside the repository, making automation version-controlled.
22. What are pipeline stages?
Stages divide work into clear sections like checkout, build, test and deploy.
23. What are triggers?
Triggers start jobs automatically, for example when code is pushed or on a schedule.
24. What are artifacts?
Artifacts are output files from a build, such as packages, reports or Docker images.
25. How are credentials handled in Jenkins?
Use Jenkins credential management, not hard-coded passwords in scripts.
Docker Questions
26. Image vs container?
An image is a template. A container is a running instance of an image.
27. What is a Dockerfile?
A Dockerfile contains instructions to build an image.
28. How do you build an image?
Use docker build -t image-name ..
29. How do you run a container?
Use docker run with options for name, ports, volumes and environment variables.
30. Why map ports?
Port mapping exposes a container service to the host or network.
31. What are volumes?
Volumes persist data outside the container lifecycle.
32. What are Docker networks?
Networks allow containers to communicate with each other.
33. What is Docker Hub?
Docker Hub is a registry for storing and sharing images.
34. What is Docker Compose?
Compose runs multi-container applications using a YAML file. For tool-focused practice, see Docker Training in Vizag.
Kubernetes Questions
35. What is a Kubernetes cluster?
A cluster is a group of machines that run containerized workloads.
36. What is a node?
A node is a worker machine in the cluster.
37. What is a pod?
A pod is the smallest deployable unit in Kubernetes and can contain one or more containers.
38. What is a deployment?
A deployment manages replicas and rollout updates for pods.
39. What is a service?
A service exposes pods through a stable network endpoint.
40. What is a replica?
A replica is an additional copy of a pod for availability and scaling.
41. What is a ConfigMap?
A ConfigMap stores non-sensitive configuration data.
42. What is a Secret?
A Secret stores sensitive data such as passwords or tokens, usually encoded and access-controlled.
43. What is a namespace?
A namespace separates resources inside a cluster.
44. How do you scale a deployment?
Use kubectl scale deployment name --replicas=3 or update the manifest. See Kubernetes Training in Vizag for deeper practice.
Terraform & Ansible Questions
45. What is Infrastructure as Code?
Infrastructure as Code manages servers, networks and cloud resources through code instead of manual clicks.
46. What are Terraform providers?
Providers let Terraform communicate with platforms such as AWS, Azure or Kubernetes.
47. What is Terraform state?
State tracks resources managed by Terraform.
48. What do plan and apply do?
terraform plan previews changes. terraform apply executes them.
49. What is Ansible inventory?
Inventory lists the servers Ansible manages.
50. What is an Ansible playbook?
A playbook is a YAML file defining tasks to run on hosts. Modules perform actions such as installing packages or copying files.
DevOps Scenario Questions
51. A Jenkins build fails. What would you check?
Check console logs, recent code changes, dependency errors, credentials, build agent status, disk space and environment variables.
52. A Docker container stops. What would you check?
Use docker ps -a, inspect exit code, check logs, verify environment variables, ports, volumes and application startup command.
53. An application is not accessible after deployment. What would you check?
Check service status, ports, firewall rules, DNS, container logs, load balancer, security groups and application health endpoint.
54. Git merge conflict occurs. What would you do?
Open conflicted files, choose the correct changes, test locally, mark files resolved and commit the merge.
55. Kubernetes pod is not running. What would you investigate?
Use kubectl describe pod, check events, image pull errors, resource limits, config, secrets, node status and logs.
Preparation Tips for Freshers
Build one complete project that uses GitHub, Jenkins, Docker and a deployment target. Add Kubernetes after you understand Docker. Use AWS basics for cloud deployment; AWS Training in Vizag can help if cloud is new. If you are an engineering fresher, read DevOps Course After B.Tech.
How to Use These Questions
Do not try to finish all questions in one sitting. Split preparation by topic. Spend one day on Linux, one day on Git, one day on Jenkins, one day on Docker, one day on Kubernetes and one day on Terraform and Ansible. On the final day, practise scenario questions. For each answer, open your terminal and run at least one related command. DevOps knowledge becomes real only when you use it.
For example, after reading about Docker logs, intentionally run a container with a wrong command and inspect the failure. After reading about Kubernetes pods, create a small deployment and scale it. After reading about Git conflicts, create two branches and resolve a conflict manually. These small exercises make interview answers more natural.
Mini Project to Practise Before Interviews
Create a simple web application repository on GitHub. Add a Dockerfile. Create a Jenkins pipeline that checks out the repository, builds the Docker image and runs the container. Then write Kubernetes manifests for deployment and service. Add a README explaining the architecture, commands and common errors. This one project can support many interview answers because it touches Git, Jenkins, Docker, Kubernetes and troubleshooting.
If you want to go further, add Terraform to create a cloud VM and Ansible to install dependencies. This is still beginner-friendly, but it shows a complete DevOps mindset: automate, document, test and troubleshoot.
Extra Scenario Answers
56. A deployment worked yesterday but fails today. What would you compare?
Compare recent code commits, dependency versions, environment variables, configuration changes, image tags, server changes and pipeline logs.
57. Disk space is full on a server. What would you check?
Use df -h for disk usage, du -sh for folder sizes, check logs, old artifacts, Docker images and unused containers before deleting anything.
58. Docker image build is slow. What can help?
Use smaller base images, improve layer ordering, use cache properly, avoid copying unnecessary files and add a .dockerignore file.
59. Jenkins credentials are failing. What would you inspect?
Check credential ID, permissions, token expiry, username/password correctness, secret binding and whether the pipeline references the right credential.
60. Kubernetes service exists but app is unreachable. What would you check?
Check pod readiness, service selector labels, target port, container port, ingress or load balancer, firewall rules and application logs.
Common Fresher Mistakes
The first mistake is memorizing definitions without using tools. The second is skipping Linux and networking. The third is copying a CI/CD project without understanding each step. The fourth is adding too many tools to the resume. The fifth is not reading logs. DevOps interviews reward calm troubleshooting, so practise breaking and fixing your own lab setup.
Final Revision Checklist
- Can you explain the path from code commit to deployment?
- Can you read basic Linux logs and service status?
- Can you resolve a simple Git conflict?
- Can you explain a Jenkinsfile stage?
- Can you build and run a Docker image?
- Can you describe a pod, deployment and service in Kubernetes?
- Can you explain Terraform plan and apply?
- Can you describe what an Ansible playbook does?
More Practice Questions
61. What is the difference between restart and reload for a service?
Restart stops and starts the service. Reload applies configuration changes without a full stop if the service supports it.
62. What is an environment variable?
It is a key-value setting used by processes, often for configuration such as ports, paths or credentials references.
63. Why should secrets not be committed to GitHub?
Secrets can be exposed publicly or internally. Use secret managers, environment variables or CI/CD credential storage.
64. What is blue-green deployment?
It uses two environments, one live and one new. Traffic switches to the new environment after validation.
65. What is rollback?
Rollback means returning to a previous working version after a failed deployment.
66. Why are health checks useful?
They help systems identify whether an application is ready and healthy before sending traffic.
67. What is a build artifact repository?
It stores build outputs such as packages, binaries or container images for later deployment.
68. What is log rotation?
Log rotation archives or removes old logs so they do not fill disk space.
69. Why use branches in CI/CD?
Branches allow teams to test feature changes separately before merging into main deployment flows.
70. What is the first thing to do during an outage?
Stay calm, gather facts, check recent changes, read alerts and logs, communicate status and avoid random fixes.
How to Explain Projects in Interviews
Use a simple structure: problem, tools, workflow, failure points and result. For example, say that you created a pipeline where code was pushed to GitHub, Jenkins built a Docker image, the image was deployed and logs were checked after deployment. Then explain one issue you faced and how you fixed it. This makes your project believable.
Keep your answers short first, then expand when the interviewer asks follow-up questions. Clear, practical answers are better than long memorized definitions.
Conclusion
Freshers should prepare DevOps interviews through practice, not memorization. Learn Linux, Git, Jenkins, Docker, Kubernetes, Terraform and Ansible in small projects, then practise explaining failures and fixes. Clear troubleshooting thinking is often the difference between a weak answer and a confident fresher answer.