Complete DevOps Engineer Interview Guide: From Containers to Production

·9 min read
devopsinterview-guidekubernetesdockercicdcareer

DevOps has evolved from a buzzword to a fundamental discipline in software engineering. Whether you're targeting DevOps Engineer, Site Reliability Engineer (SRE), or Platform Engineer roles, interviewers expect deep knowledge of containers, automation, and production systems.

This guide covers everything you need to prepare—from containerization fundamentals to deployment strategies that keep systems running at scale.

What DevOps Interviews Actually Test

Before diving into topics, understand what interviewers are really evaluating:

Technical depth:

  • Can you explain why things work, not just how?
  • Do you understand trade-offs between approaches?
  • Can you troubleshoot when things go wrong?

Operational mindset:

  • How do you think about reliability, monitoring, and incident response?
  • Do you consider security, scalability, and maintainability?
  • Can you balance velocity with stability?

Collaboration signals:

  • How do you work with developers?
  • Can you explain technical concepts clearly?
  • Do you understand the full software delivery lifecycle?

Core Topic Areas

1. Containerization with Docker

Docker is foundational. Every DevOps interview covers containers.

Key concepts:

  • Images vs containers (immutable templates vs running instances)
  • Dockerfile instructions and layer caching
  • Multi-stage builds for production images
  • docker-compose for local development
  • Networking and volumes

Example question: "Walk me through how you'd containerize a Node.js application for production."

# Multi-stage build
FROM node:20 AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
 
FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
USER node
EXPOSE 3000
CMD ["node", "dist/index.js"]

What interviewers want to hear:

  • Why multi-stage (smaller images, no build tools in production)
  • Why alpine (security, size)
  • Why non-root user (security)
  • Layer ordering for cache efficiency

2. Container Orchestration with Kubernetes

Kubernetes is the standard for running containers at scale.

Key concepts:

  • Pods, Deployments, ReplicaSets
  • Services (ClusterIP, NodePort, LoadBalancer)
  • ConfigMaps and Secrets
  • Namespaces for isolation
  • Resource requests and limits
  • Liveness and readiness probes

Example question: "A pod is stuck in CrashLoopBackOff. How do you troubleshoot?"

# Check pod status and events
kubectl describe pod my-app-xxx
 
# Check logs from current and previous container
kubectl logs my-app-xxx
kubectl logs my-app-xxx --previous
 
# Common causes:
# - Application error on startup
# - Missing config/secrets
# - Failing liveness probe
# - OOMKilled (check resource limits)

What interviewers want to hear:

  • Systematic debugging approach
  • Understanding of pod lifecycle
  • Knowledge of common failure modes

3. CI/CD Pipelines

Automation is central to DevOps. CI/CD questions are guaranteed.

Key concepts:

  • CI vs CD vs Continuous Deployment
  • Pipeline stages (build, test, deploy)
  • GitHub Actions / Jenkins / GitLab CI
  • Secrets management
  • Deployment strategies (rolling, blue-green, canary)
  • Artifact management

Example question: "Design a CI/CD pipeline for a microservices application."

# GitHub Actions example
name: CI/CD
 
on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
 
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: npm ci
      - run: npm test
 
  build:
    needs: test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: docker build -t myapp:${{ github.sha }} .
      - run: docker push myapp:${{ github.sha }}
 
  deploy-staging:
    needs: build
    runs-on: ubuntu-latest
    environment: staging
    steps:
      - run: kubectl set image deployment/myapp myapp=myapp:${{ github.sha }}
 
  deploy-production:
    needs: deploy-staging
    runs-on: ubuntu-latest
    environment: production  # Manual approval
    steps:
      - run: kubectl set image deployment/myapp myapp=myapp:${{ github.sha }}

What interviewers want to hear:

  • Separation of CI (quality gates) and CD (deployment)
  • Environment-specific configurations
  • Rollback strategies
  • Security considerations (secrets, least privilege)

4. Linux Fundamentals

DevOps runs on Linux. Command-line fluency is non-negotiable.

Key concepts:

  • File permissions and ownership
  • Process management (ps, top, kill)
  • Text processing (grep, sed, awk)
  • Networking (curl, netstat, lsof)
  • Log analysis
  • Shell scripting

Example question: "A server is running slowly. How do you diagnose the issue?"

# Check system resources
top                          # CPU and memory per process
htop                         # Better interactive view
free -h                      # Memory usage
df -h                        # Disk space
iostat                       # Disk I/O
 
# Check processes
ps aux --sort=-%cpu | head   # Top CPU consumers
ps aux --sort=-%mem | head   # Top memory consumers
 
# Check network
netstat -tulpn               # Listening ports
ss -s                        # Socket statistics
lsof -i :80                  # What's using port 80
 
# Check logs
tail -f /var/log/syslog
journalctl -u myservice -f

What interviewers want to hear:

  • Systematic approach (not random commands)
  • Understanding of resource types (CPU, memory, disk, network)
  • Ability to drill down from symptoms to root cause

5. Version Control with Git

Git workflows underpin everything in DevOps.

Key concepts:

  • Branching strategies (GitFlow, trunk-based)
  • Merge vs rebase
  • Cherry-pick, reset, revert
  • Resolving merge conflicts
  • Git hooks

Example question: "When would you use rebase vs merge?"

Merge: Creates a merge commit, preserves complete history. Use for shared branches, feature completion.

Rebase: Rewrites history onto target branch, creates linear history. Use for local cleanup, keeping feature branches updated.

# Updating feature branch with main changes
git checkout feature
git rebase main
 
# Interactive rebase to clean up commits
git rebase -i HEAD~3

What interviewers want to hear:

  • Understanding of when each is appropriate
  • Awareness of rebase dangers on shared branches
  • How Git history affects CI/CD and debugging

6. System Design for DevOps

DevOps interviews often include system design, focused on infrastructure.

Key concepts:

  • High availability and fault tolerance
  • Load balancing and scaling
  • Caching strategies
  • Database replication
  • CDN and edge computing
  • Disaster recovery

Example question: "Design a highly available deployment for a web application."

                    ┌─────────────┐
                    │   Route 53  │ (DNS)
                    └──────┬──────┘
                           │
                    ┌──────▼──────┐
                    │     ALB     │ (Load Balancer)
                    └──────┬──────┘
                           │
          ┌────────────────┼────────────────┐
          │                │                │
    ┌─────▼─────┐    ┌─────▼─────┐    ┌─────▼─────┐
    │   AZ-1    │    │   AZ-2    │    │   AZ-3    │
    │  ┌─────┐  │    │  ┌─────┐  │    │  ┌─────┐  │
    │  │ K8s │  │    │  │ K8s │  │    │  │ K8s │  │
    │  │nodes│  │    │  │nodes│  │    │  │nodes│  │
    │  └─────┘  │    │  └─────┘  │    │  └─────┘  │
    └───────────┘    └───────────┘    └───────────┘
                           │
                    ┌──────▼──────┐
                    │   Aurora    │ (Multi-AZ DB)
                    │   Cluster   │
                    └─────────────┘

What interviewers want to hear:

  • Multi-AZ / multi-region for availability
  • Auto-scaling for traffic spikes
  • Database replication and failover
  • Caching layer (Redis/ElastiCache)
  • CDN for static assets
  • Monitoring and alerting

7. Security Fundamentals

Security is everyone's job, especially in DevOps.

Key concepts:

  • Container security (non-root, image scanning)
  • Secret management (Vault, cloud secret managers)
  • Network policies and firewalls
  • RBAC and least privilege
  • OWASP top 10
  • Supply chain security

Example question: "How do you handle secrets in a Kubernetes environment?"

# Don't do this - secrets in plain text
env:
  - name: DB_PASSWORD
    value: "mysecret"  # NO!
 
# Better - Kubernetes secret
env:
  - name: DB_PASSWORD
    valueFrom:
      secretKeyRef:
        name: db-credentials
        key: password
 
# Best - External secret manager
# Using External Secrets Operator with AWS Secrets Manager
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
  name: db-credentials
spec:
  secretStoreRef:
    name: aws-secrets-manager
  target:
    name: db-credentials
  data:
    - secretKey: password
      remoteRef:
        key: prod/db/password

What interviewers want to hear:

  • Never hardcode secrets
  • Encryption at rest and in transit
  • Rotation and auditing
  • Integration with cloud-native solutions

Quick Reference: DevOps Interview Topics

CategoryKey TopicsPriority
ContainersDocker, images, Dockerfile, composeHigh
OrchestrationKubernetes, pods, services, deploymentsHigh
CI/CDGitHub Actions, pipelines, deployment strategiesHigh
LinuxCommands, permissions, troubleshootingHigh
GitBranching, merge/rebase, workflowsMedium
System DesignHA, scaling, load balancingMedium
SecuritySecrets, RBAC, container securityMedium
CloudAWS/GCP/Azure core servicesMedium
IaCTerraform, CloudFormationMedium
MonitoringPrometheus, Grafana, loggingMedium

Interview Formats to Expect

Technical screen (45-60 min):

  • Conceptual questions on containers, K8s, CI/CD
  • "Tell me about a time you..." operational scenarios
  • Basic troubleshooting walkthrough

System design (45-60 min):

  • Design a deployment pipeline
  • Architecture for high availability
  • Scaling a specific service

Hands-on/live coding (60-90 min):

  • Write a Dockerfile
  • Create a GitHub Actions workflow
  • Debug a failing Kubernetes deployment
  • Write a shell script

Take-home project:

  • Set up infrastructure with Terraform
  • Create complete CI/CD pipeline
  • Deploy application to Kubernetes

How to Prepare

Build real projects:

  1. Containerize an application with Docker
  2. Deploy to Kubernetes (minikube, kind, or managed K8s)
  3. Set up CI/CD with GitHub Actions
  4. Add monitoring with Prometheus/Grafana

Practice troubleshooting:

  • Break things intentionally and fix them
  • Use chaos engineering tools (chaos-monkey)
  • Practice explaining your debugging process

Study patterns, not just tools:

  • Understand why patterns exist
  • Know trade-offs between approaches
  • Be ready to discuss alternatives

Related Articles

This pillar guide connects to detailed coverage of each topic:

Containerization & Orchestration:

Automation & Linux:

Version Control:

Architecture & Security:

Monitoring & Observability:

Cloud:

Networking:

Infrastructure as Code:


Final Thoughts

DevOps interviews reward depth over breadth. It's better to deeply understand Docker, Kubernetes, and CI/CD than to superficially know 20 tools.

Focus on:

  1. Fundamentals first - Containers before orchestration, Linux before cloud
  2. Hands-on experience - Build things, break things, fix things
  3. Operational thinking - Reliability, monitoring, incident response
  4. Communication - Explain complex topics clearly

The candidates who stand out can explain not just how to do something, but why it's done that way and what could go wrong.

Ready to ace your interview?

Get 550+ interview questions with detailed answers in our comprehensive PDF guides.

View PDF Guides