DevOps Engineer interview questions and answers
DevOps and SRE interviews test how you build, ship and run software reliably: CI/CD pipelines, containers, Kubernetes, infrastructure as code, monitoring and handling incidents.
Skills and knowledge
What does a good CI/CD pipeline look like?
Sample answer: On every push it builds once, runs linting and tests, scans for vulnerabilities and produces a versioned artifact such as a container image. That same artifact is promoted through staging to production, ideally with automatic checks and a safe rollout like canary or blue-green, plus a one-step rollback. Pipelines should be fast, repeatable and defined in code.
What is the difference between a container and a virtual machine?
Sample answer: A virtual machine runs a full operating system on virtual hardware, so it is heavy but strongly isolated. A container shares the host's kernel and packages only the app and its libraries, so it starts in seconds and uses far less memory. Containers are ideal for shipping apps consistently; VMs still suit stronger isolation or different operating systems.
Explain the main Kubernetes objects you use.
Sample answer: A Pod runs one or more containers. A Deployment keeps a set number of identical pods running and handles rolling updates. A Service gives pods a stable address and load balances across them, and an Ingress routes outside HTTP traffic to services. ConfigMaps and Secrets hold settings, and a HorizontalPodAutoscaler adds pods under load.
Why use infrastructure as code?
Sample answer: Writing infrastructure in code with Terraform, CloudFormation or Pulumi makes environments repeatable, reviewable in pull requests and easy to recreate after a disaster. It ends hand-made servers nobody can rebuild. Keep state stored safely and locked, and review plans before applying.
How do you monitor a production service?
Sample answer: Track the four golden signals: latency, traffic, errors and saturation. Collect metrics (Prometheus, CloudWatch), logs and traces, and set alerts on user-facing symptoms against service level objectives rather than on every CPU spike. Every alert should be actionable and link to a runbook.
A server's disk is full. How do you troubleshoot?
Sample answer: Use df -h to find the full filesystem and du -sh on directories to find what grew, often logs, temp files or old images. Check for deleted files still held open by a process with lsof. Free space safely, then fix the cause with log rotation, cleanup jobs or an alert before it fills again.
What deployment strategies do you know?
Sample answer: Rolling updates replace instances a few at a time. Blue-green runs the new version beside the old and switches traffic at once, with instant rollback. Canary sends a small share of traffic to the new version first and widens it if metrics stay healthy. Feature flags let you ship code switched off and turn it on separately.
How do you manage secrets?
Sample answer: Never commit them to Git. Store them in a secret manager such as Vault, AWS Secrets Manager or Kubernetes Secrets with encryption, give each service only the secrets it needs, rotate them regularly and audit access. Prefer short-lived credentials and cloud roles over long-lived keys.
What is the difference between SLI, SLO and SLA?
Sample answer: A service level indicator is a measured number, such as the share of requests served under 300 milliseconds. A service level objective is the internal target for it, like 99.9% over 30 days. A service level agreement is the promise to customers, usually looser than the SLO, with penalties if broken. The gap below the SLO is the error budget.
How do you make a Docker image smaller and safer?
Sample answer: Use a small base image such as slim or distroless, multi-stage builds so compilers stay out of the final image, copy only needed files with a .dockerignore, combine and clean up install steps, run as a non-root user, pin versions and scan the image for known vulnerabilities in CI.
What is GitOps?
Sample answer: GitOps keeps the desired state of infrastructure and deployments in a Git repository. A tool such as Argo CD or Flux runs in the cluster and keeps reality matching the repository, so every change goes through a pull request, has history and can be rolled back by reverting a commit.
How would you debug a pod stuck in CrashLoopBackOff?
Sample answer: Run kubectl describe pod to see events and the exit reason, then kubectl logs with --previous to read the crashed container's output. Common causes are a wrong command, missing config or secret, failing health checks, too little memory (OOMKilled) or a dependency it cannot reach. Fix the cause, not the restart limit.
Past experience
Tell me about an outage you helped resolve.
Sample answer: Explain your role, how the problem was detected, the steps you took to restore service, the root cause and the follow-up actions. Stress the blameless review and what you automated or alerted on so it would not happen again.
Tell me about something you automated that saved the team time.
Sample answer: Describe the manual task, how often it happened and how long it took, the tool or script you built, and the time saved per week or the errors avoided. Mention how you documented it so others could use and maintain it.
What would you do?
Developers say deployments are slow and scary. What would you change?
Sample answer: Measure the pipeline and find the slow steps; cache dependencies and run tests in parallel. Make releases smaller and more frequent, add automated tests and health checks, introduce canary or blue-green releases and a one-click rollback. Fear goes down when going back is easy.
You are paged at 3 a.m. for high error rates. Walk me through your first 15 minutes.
Sample answer: Acknowledge the page, check the dashboard to see scope and when it started, and look at recent deploys or config changes. If a recent change lines up, roll it back. Post a short status in the incident channel, bring in help if it is beyond you, and keep notes with times for the later review.
Open DevOps Engineer jobs
Remote · United States
Sr. Azure Application Administrator - Enterprise Solutions Services
Remote · Worldwide
Security Lead (Remote - Poland)
Remote · Worldwide
AWS Engineer | DevOps & Cloud Infrastructure
—
Principal Technical Architect
United States
Solutions Engineer, U.S. Enterprise
Amsterdam, Netherlands