DevOps & Cloud Topic
DevOps Interview Questions: Simple Answers with Examples
Use these questions to practise explaining your thinking in clear language. Learn the idea, then answer in your own words. Interview questions differ between companies; this list is practice, not a promise of what an interviewer will ask.
How to practise
Read one question. Say a short answer aloud. Add a small example and explain one limit or risk. If you have not used a tool at work, describe your lab experience honestly.
1. What is DevOps?
DevOps is a way for development and operations people to work together. They share responsibility for building, releasing and running software. A tool can help, but buying a tool does not create teamwork.
Example to discuss: Describe a small change you helped test, release or support. Explain who worked together and what improved.
2. How is DevOps different from Agile?
Agile helps teams deliver and learn in small steps. DevOps extends shared work into delivery and operation of the service. They can support each other; they are not competing job titles.
Example to discuss: Give an example of feedback from a production issue becoming a small development task.
3. What is CI?
Continuous integration means merging small changes often and checking them automatically. Tests should give useful feedback before people build more work on top of a broken change.
Example to discuss: For a Python app, run unit tests on each pull request. A passing check does not prove every user journey works.
4. What is continuous delivery?
Continuous delivery keeps software ready for release through a repeatable process. A person may still approve production. Continuous deployment automatically releases changes that pass the agreed checks.
Example to discuss: Explain where your team puts approvals and why. Do not say every team must deploy every commit.
5. What belongs in a CI/CD pipeline?
A small pipeline may check code, run tests, build an artifact and release it. Add security and deployment checks that fit the risk. Keep secrets out of logs.
Example to discuss: Start with the example check workflow. Add a deployment only after identity and recovery are planned.
6. Why use Git?
Git records versions of files and supports review and collaboration. A commit is a recorded change. A branch is a line of work. Git is not a backup system for live databases.
Example to discuss: Use git status and git diff before a commit. Explain the change in a short message.
7. What is a merge conflict?
A conflict means Git cannot safely combine some changes on its own. Read both intentions, edit the result and test it. Removing the conflict markers without understanding the code is not enough.
Example to discuss: Resolve a conflict in a practice branch, then check that both useful changes remain.
8. Which Linux checks help with a failed service?
Check whether the process is running, what it listens on, and what its logs say. Then check disk space, memory and permissions. Use read-only checks first.
Example to discuss: Explain your order of investigation instead of listing commands you cannot describe.
9. What is a container?
A container runs an isolated process using an image and a runtime. It usually shares the host operating system kernel. It is not a full virtual machine and not a complete security boundary by itself.
Example to discuss: Our lab packages a Python app into lecturre-web:1.0.
10. What is the difference between an image and a container?
An image is the packaged template. A container is a running or stopped instance made from it. Several containers can use one image and still have different settings.
Example to discuss: The products and orders lab services share an image but use different APP_ROLE values.
11. What is a Dockerfile?
A Dockerfile describes how to build an image. It chooses a base, copies files and sets how the app starts. Keep credentials and unnecessary files out of the build context.
Example to discuss: Use a .dockerignore file, a non-root user and a versioned image. Update the base image regularly.
12. What does Docker Compose do?
Compose describes local services, networks and volumes in a YAML file. It is useful for a repeatable development setup. It does not automatically give production failover across machines.
Example to discuss: Run docker compose config before starting the local lab.
13. Why use Kubernetes?
Kubernetes schedules containers and tries to keep the requested state running. It provides features such as service discovery and rolling updates. It also adds work, so a small app may not need it.
Example to discuss: Compare a managed app platform with Kubernetes before choosing either.
14. What are a Pod, Deployment and Service?
A Pod runs one or more closely related containers. A Deployment manages replacement Pods. A Service offers a stable network name for matching Pods.
Example to discuss: If a Service has no ready endpoints, check labels, selectors and readiness.
15. What is infrastructure as code?
Infrastructure as code describes infrastructure in files that can be reviewed and applied with a tool. The files help repeat changes. They do not remove the need to review a plan.
Example to discuss: The Terraform lesson starts with local data so learners can practise without creating cloud resources.
16. What is Terraform state?
State connects declared resources with the objects Terraform manages. It can contain private information. Protect it, control access and coordinate changes.
Example to discuss: For an AWS S3 backend, review native lockfiles and bucket versioning. Do not commit state into Git.
17. How are Terraform and Ansible different?
Terraform commonly manages infrastructure resources and tracks them in state. Ansible commonly configures machines and runs tasks. Their uses overlap, but the operating models differ.
Example to discuss: Explain which tool owns a resource so two tools do not keep changing it back and forth.
18. What is the difference between logs and metrics?
Logs describe individual events. Metrics record measurements over time. Traces follow work across steps or services. Use them together to answer a specific question.
Example to discuss: A higher error rate tells you there is a problem. A related log may help explain an individual failure.
19. How should you handle secrets?
Keep secrets out of source code, images and normal logs. Use an appropriate secret store and limit who can read it. Prefer short-lived identity where possible.
Example to discuss: If a key leaks, revoke or rotate it and check its use. Removing the text from the newest commit is not sufficient.
20. How do you make a deployment safer?
Use small changes, useful checks and a clear recovery plan. Watch user-facing errors and latency during a release. Stop when the agreed limits are crossed.
Example to discuss: Do not call two replicas a canary unless you can control traffic and compare the new version.
21. What do you do when production is down?
Confirm user impact, communicate and collect evidence. Follow the runbook and reduce harm with a safe action. Keep a timeline and avoid several people making unrelated changes at once.
Example to discuss: Say what you know, what is still uncertain, and when the next update will come.
22. How do you explain a project in an interview?
Explain the problem, your role, the choices and the result. Be clear about what you personally did. A small project you understand is stronger than a large diagram you cannot explain.
Example to discuss: Use the shared lab: show one request, one test, one deployment check and one improvement you would make for production.
Build one example you can explain
Work through the Docker lab, the Kubernetes lab and the reliability guide. Write what worked, what failed and what you would change before production. You do not need every tool to show careful problem solving.
Official references and further reading
Reviewed on 25 October 2026. Tools change, so check the official documentation for the version you use.
Comments (0)
No comments yet. Be the first to comment!