πŸ”§ DevOps Interview Questions

Master DevOps interviews with questions on CI/CD, Docker, Kubernetes, Infrastructure as Code, and monitoring

CI/CD pipelines, GitHub Actions, Docker, containerization, and Infrastructure as Code

⚑

15-Minute DevOps Cheatsheet

Quick reference for last-minute interview preparation

πŸ”„ CI/CD Pipeline

CI: Build β†’ Test β†’ Merge (continuous)
CD: Deploy to staging β†’ production
Tools: GitHub Actions, Jenkins, GitLab CI
Artifacts: Docker images, binaries, packages
Gates: Tests, code review, security scans

🐳 Docker Essentials

Image: Template, layers, immutable
Container: Running instance of image
Dockerfile: FROM, RUN, COPY, CMD, ENTRYPOINT
Volumes: Persistent data, bind mounts
Network: bridge, host, overlay

☸️ Kubernetes Core

Pod: Smallest unit, 1+ containers
Deployment: Desired state, replicas, rollout
Service: ClusterIP, NodePort, LoadBalancer
ConfigMap/Secret: Configuration injection
Ingress: HTTP routing, TLS termination

πŸ“ Infrastructure as Code

Terraform: Multi-cloud, declarative, state file
Ansible: Agentless, YAML playbooks
CloudFormation: AWS native IaC
Pulumi: Real programming languages
Principles: Immutable, version controlled

πŸ“Š Monitoring & Observability

Metrics: Prometheus, Grafana, Datadog
Logs: ELK Stack, Loki, Splunk
Traces: Jaeger, Zipkin, OpenTelemetry
Alerting: PagerDuty, OpsGenie
Golden Signals: Latency, Traffic, Errors, Saturation

☁️ Cloud & Security

AWS: EC2, S3, RDS, Lambda, EKS
Azure: VMs, Blob, SQL, Functions, AKS
GCP: Compute, Storage, Cloud SQL, GKE
Security: IAM, secrets management, scanning
Networking: VPC, subnets, security groups

πŸ’» Essential Commands

docker build -t app . && docker run -p 8080:80 app
kubectl apply -f deployment.yaml
terraform init && terraform plan && terraform apply
kubectl get pods -n namespace -o wide

⚠️ Key Interview Topics

β€’ Blue-green vs Canary vs Rolling deployments
β€’ 12-Factor App principles
β€’ GitOps workflow (ArgoCD, Flux)
β€’ Container vs VM differences
β€’ Horizontal vs Vertical scaling
β€’ SLI, SLO, SLA definitions

CI/CD (Continuous Integration/Continuous Deployment) automates the software delivery process. CI merges code changes frequently and runs automated tests. CD automatically deploys to production.

Key Components:

  • Source Control: Git, GitHub, GitLab
  • Build: Compile code, run tests
  • Test: Unit, integration, e2e tests
  • Deploy: Push to staging/production
  • Monitor: Track application health
YAML

Docker containerizes applications with their dependencies, ensuring consistency across environments. Multi-stage builds optimize image size by separating build and runtime dependencies.

Dockerfile
YAML
bash

Kubernetes (K8s) orchestrates containerized applications at scale. It manages deployment, scaling, and operations of application containers across clusters of hosts.

Key Components:

  • Control Plane: API Server, Scheduler, Controller Manager, etcd
  • Worker Nodes: Kubelet, Container Runtime, Kube-proxy
  • Pods: Smallest deployable units
  • Services: Stable network endpoints
  • Deployments: Declarative updates for Pods
YAML
bash

Infrastructure as Code (IaC) manages infrastructure through code rather than manual processes. Terraform is a popular IaC tool that supports multiple cloud providers.

HCL
bash

Monitoring tracks system health through metrics. Observability provides deeper insights through metrics, logs, and traces. Prometheus collects metrics, Grafana visualizes them.

YAML
YAML
JavaScript

Interview Tips for DevOps