VIDHAIX / DATA & DEVOPS / INTERVIEW PREP

Top 43 DevOps Interview Questions & Answers (2026)

CI/CD, Terraform, Kubernetes, GitOps, AWS, observability, SLOs and real incident scenarios.

43 questions with answersUpdated 22 October 2026Reviewed by VidhaiX trainers

These DevOps interview questions are for freshers moving into cloud and platform roles, developers shifting towards operations, and engineers with a few years of experience preparing for DevOps, SRE or platform engineering interviews. They were compiled by VidhaiX trainers who run mock interviews for these roles and see where candidates repeatedly lose marks.

In 2026, Indian product companies, service companies and startups rarely ask for tool definitions alone. They probe whether you can build and debug a pipeline, reason about Terraform state, explain why a Kubernetes rollout stalled, set a sensible SLO and run an incident calmly. Service companies lean on Jenkins, AWS and Ansible; product companies and startups go deeper on GitOps, observability and cost. The page moves from fresher fundamentals to intermediate tooling, then experienced-level design and trade-offs, and ends with scenario questions modelled on real production situations.

How to Prepare for a DevOps Interview

  • Build one end-to-end project: a small app with a GitHub Actions pipeline that tests, builds a container image, scans it and deploys to a Kubernetes cluster you created yourself.
  • Provision that infrastructure with Terraform using remote state and locking, then deliberately cause drift in the console and practise detecting and fixing it with plan.
  • Practise Linux troubleshooting on a throwaway VM: fill a disk, leak memory, spike CPU, and diagnose each one using df, du, top, free, journalctl and dmesg without searching.
  • Install Prometheus and Grafana on a local cluster, write two PromQL queries for request rate and error ratio, and define one SLO with an error budget alert.
  • Read two public postmortems from well-known companies and practise retelling one in under three minutes: impact, timeline, root cause, contributing factors and follow-up actions.
  • Prepare two honest stories from your own work: a deployment or outage that went wrong, what you changed afterwards, and which metric showed the improvement.
  • Be able to draw a basic AWS VPC on a whiteboard with public and private subnets, NAT gateway, load balancer and security groups, and explain how a request flows through it.

DevOps Interview Questions for Freshers

12 questions

Q1.What is DevOps, and how is it different from SRE?

DevOps is a set of practices and a culture that removes the wall between development and operations: shared ownership, automation, small frequent changes and fast feedback. It is not a job title or a tool. SRE, from Google, is one concrete way to implement those ideas, treating operations as a software problem with explicit reliability targets.

A strong answer mentions what SRE adds: SLOs and error budgets that decide when to slow releases, a cap on toil, and blameless postmortems. A weak answer says DevOps is CI/CD and SRE is monitoring.

Q2.Explain continuous integration, continuous delivery and continuous deployment. How do they differ?

Continuous integration means every developer merges small changes into the main branch frequently, and each merge triggers an automated build and test run, so integration problems surface within minutes. Continuous delivery extends that: every change that passes the pipeline is releasable, and production deployment is a one-click, often manual approval. Continuous deployment removes the manual step entirely, so every green change goes to production automatically.

Interviewers like candidates who note that continuous deployment needs strong tests, feature flags and fast rollback to be safe.

Q3.What is trunk-based development, and why do many teams prefer it over long-lived feature branches?

In trunk-based development everyone commits to one main branch, either directly or through short-lived branches merged within a day or two. Unfinished work is hidden behind feature flags rather than kept on a branch. This keeps merges small, makes CI meaningful because it tests what will actually ship, and supports continuous delivery.

Long-lived branches, as in classic GitFlow, cause painful merges and delay feedback. A good answer acknowledges GitFlow still fits products with multiple supported release versions.

Q4.What are the typical stages of a CI/CD pipeline?

A typical pipeline runs checkout, dependency install, lint and static analysis, unit tests, build, then packaging into an artifact such as a container image. It then scans that artifact, publishes it to a registry, deploys to a staging environment, runs integration or smoke tests, and promotes the same artifact to production, often with an approval gate.

The key point interviewers look for is build once, deploy many: the exact artifact tested in staging is what reaches production, never a rebuild.

Q5.What is Infrastructure as Code, and what problems does it solve?

Infrastructure as Code means describing servers, networks, databases and permissions in version-controlled files and applying them with a tool such as Terraform, OpenTofu, CloudFormation or Pulumi. It replaces manual console clicks with reviewed, repeatable changes.

It solves snowflake environments, undocumented setups and slow provisioning. Changes go through pull requests, so you get review, history and rollback. Staging and production can be built from the same modules, which reduces environment drift and makes disaster recovery a matter of re-applying code.

Q6.What is the difference between a Pod, a Deployment and a Service in Kubernetes?

A Pod is the smallest deployable unit: one or more containers sharing a network namespace and volumes. Pods are disposable and get new IPs when recreated. A Deployment manages a ReplicaSet that keeps the desired number of identical Pods running and handles rolling updates and rollbacks.

A Service gives a stable virtual IP and DNS name in front of a changing set of Pods, selected by labels. A common trap is saying you deploy Pods directly in production; you almost always use a controller.

yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: api
spec:
  replicas: 3
  selector:
    matchLabels: { app: api }
  template:
    metadata:
      labels: { app: api }
    spec:
      containers:
        - name: api
          image: registry.example.com/api:1.4.2

Q7.What is the difference between a ConfigMap and a Secret in Kubernetes?

Both inject configuration into Pods as environment variables or mounted files. A ConfigMap holds non-sensitive settings such as feature toggles and URLs. A Secret is intended for credentials and keys, gets stricter RBAC handling and can be encrypted at rest in etcd if the cluster is configured for it.

The trap: Secret values are only base64-encoded, not encrypted, by default. Strong candidates mention enabling encryption at rest, limiting RBAC access, and syncing from an external store with External Secrets Operator.

Q8.How do Git merge and rebase differ, and when would you use each?

A merge combines two branches by creating a merge commit, preserving the exact history of both. A rebase replays your commits on top of another branch, producing a linear history with new commit hashes.

Rebase your own local or short-lived branch onto main before opening a pull request to keep history clean. Never rebase commits others have already pulled, because rewriting shared history forces everyone to reconcile. Many teams use squash merges on pull requests, which keeps main linear without rebasing shared branches.

Q9.What do DNS and TLS do when a user opens your website?

DNS translates the hostname into an IP address: the browser asks a recursive resolver, which walks root, TLD and authoritative servers, caching answers according to TTL. Records you should know are A, AAAA, CNAME, MX and TXT.

The browser then opens a TCP connection, or QUIC for HTTP/3, and performs a TLS handshake: the server presents a certificate, the browser validates its chain and hostname, and both agree on session keys. Interviewers like hearing about certificate expiry outages and automated renewal with ACME tools such as cert-manager.

Q10.Which Linux commands do you use first when a server is behaving badly?

Start broad: uptime for load averages, top or htop for CPU and memory per process, free -h for memory, df -h and df -i for disk space and inodes, and ss -tulpn for listening ports and connections.

Then dig into logs with journalctl -u service-name and dmesg for kernel messages such as OOM kills. systemctl status shows whether a service is running and why it last exited. A strong answer follows a method rather than listing commands randomly.

Q11.What is the difference between monitoring and observability?

Monitoring answers known questions: is CPU high, is the error rate above a threshold, is the site up. You decide in advance what to watch. Observability is the ability to ask new questions about system behaviour from its outputs without shipping new code, which matters for failures you did not predict.

It rests on metrics, logs and traces, ideally correlated through shared context such as trace IDs. A good fresher answer names Prometheus and Grafana for metrics and OpenTelemetry for instrumentation.

Q12.What is the principle of least privilege, and how does it apply to AWS IAM?

Least privilege means every user, service and pipeline gets only the permissions it needs, for only as long as it needs them. In AWS IAM this means scoping policies to specific actions and resource ARNs rather than using *, preferring roles with temporary credentials over long-lived access keys, and separating environments into different accounts.

Interviewers also want tools: IAM Access Analyzer to generate policies from actual usage, permission boundaries, and Service Control Policies in AWS Organizations as guardrails.

DevOps Intermediate Interview Questions

12 questions

Q13.Walk me through a GitHub Actions workflow that tests, builds and pushes a container image.

A workflow is YAML under .github/workflows, triggered by events such as push or pull_request. Jobs run on runners, and steps either run shell commands or call reusable actions. A typical job checks out code, sets up the language runtime with caching, runs tests, then builds and pushes an image with BuildKit.

Strong answers mention least-privilege permissions, pinning third-party actions to a commit SHA, concurrency to cancel superseded runs, and needs to order jobs.

yaml
on: { push: { branches: [main] } }
permissions: { contents: read, packages: write }
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with: { node-version: 22, cache: npm }
      - run: npm ci && npm test
      - uses: docker/build-push-action@v6
        with: { push: true, tags: ghcr.io/acme/api:latest }

Q14.How do Jenkins pipelines compare with GitHub Actions, and when would you still choose Jenkins?

Jenkins is self-hosted, and pipelines are defined in a Jenkinsfile using declarative or scripted Groovy, with agents doing the work. It is extremely flexible through plugins but you own upgrades, plugin compatibility, security patching and scaling of agents.

GitHub Actions is managed and tightly integrated with pull requests, with a large marketplace of actions. Jenkins still makes sense for air-gapped networks, heavy on-premises build hardware or existing large investments. A strong candidate mentions plugin sprawl and controller security as Jenkins pain points.

Q15.What is the difference between caching and artifacts in a CI pipeline?

A cache speeds up future runs by reusing things that are expensive to recreate, such as package manager downloads or Docker layers, keyed by a hash of the lockfile. A cache miss must still produce a correct build, so it is an optimisation, not a dependency.

Artifacts are outputs of a run that you need to keep or pass between jobs: build bundles, test reports, coverage, binaries. A common mistake is caching node_modules across OS or runtime versions, or treating artifacts as a release store instead of a proper registry.

Q16.How should a CI pipeline authenticate to AWS without storing access keys?

Use OIDC federation. The CI provider issues a short-lived signed token for each job, and AWS trusts that provider through an IAM OIDC identity provider. The pipeline assumes a role whose trust policy restricts the token's subject, for example to one repository and the main branch, and receives temporary credentials.

This removes long-lived keys that can leak through logs or forks. Interviewers check whether you scope the trust condition tightly; trusting every repository in an organisation is a classic misconfiguration.

yaml
permissions:
  id-token: write
  contents: read
steps:
  - uses: aws-actions/configure-aws-credentials@v4
    with:
      role-to-assume: arn:aws:iam::123456789012:role/gh-deploy
      aws-region: ap-south-1
  - run: aws sts get-caller-identity

Q17.How does Terraform state work, and why do teams use remote state with locking?

Terraform state maps resources in your code to real objects in the cloud, storing IDs and attributes so Terraform can compute a diff. Without it, Terraform would not know what it already created.

Local state breaks in teams: people overwrite each other and the file may hold secrets. Remote backends such as S3 or Terraform Cloud store state centrally with encryption, and locking prevents two concurrent applies from corrupting it. Recent Terraform and OpenTofu versions support S3-native locking, so a DynamoDB table is no longer required.

hcl
terraform {
  backend "s3" {
    bucket       = "acme-tf-state"
    key          = "prod/network/terraform.tfstate"
    region       = "ap-south-1"
    encrypt      = true
    use_lockfile = true
  }
}

Q18.What happens during terraform plan and terraform apply, and how do you review a plan safely?

terraform plan refreshes state against real infrastructure, compares it with your configuration and shows what will be created, updated in place, replaced or destroyed. terraform apply executes those changes, ideally from a saved plan file so what was reviewed is exactly what runs.

When reviewing, look hardest at replacements, marked as destroy-then-create, on stateful resources such as databases. Use prevent_destroy lifecycle rules for critical resources, and run plan automatically on pull requests with the output posted for review.

Q19.How do you structure reusable Terraform modules across environments?

Create small, focused modules such as network, database or service, with clear input variables and outputs, and version them through Git tags or a private registry. Each environment then has a thin root configuration that calls those modules with its own values and its own state file.

Avoid one giant state for everything, because a single bad apply then has a huge blast radius and plans get slow. Workspaces suit identical short-lived copies, while separate directories or accounts are clearer for production versus staging.

Q20.What is Ansible used for, and how does it differ from Terraform?

Ansible is a configuration management and automation tool: it connects agentlessly over SSH and runs idempotent tasks from YAML playbooks to install packages, manage files, configure services and orchestrate steps across many hosts. Terraform provisions infrastructure declaratively and tracks it in state.

A common split is Terraform creating VMs and networks, Ansible configuring what runs on them. With immutable images and containers, Ansible's role often shrinks to building golden images or managing legacy servers. Idempotence and handlers are the concepts interviewers probe.

yaml
- hosts: web
  become: true
  tasks:
    - name: Install nginx
      ansible.builtin.apt: { name: nginx, state: present }
    - name: Deploy config
      ansible.builtin.template: { src: nginx.conf.j2, dest: /etc/nginx/nginx.conf }
      notify: Reload nginx
  handlers:
    - name: Reload nginx
      ansible.builtin.service: { name: nginx, state: reloaded }

Q21.Explain liveness, readiness and startup probes. What goes wrong when they are misconfigured?

A readiness probe decides whether a Pod receives traffic from a Service; failing it removes the Pod from endpoints without restarting it. A liveness probe restarts the container when it fails, for genuinely stuck processes. A startup probe holds off the other probes until a slow-starting app is up.

Classic mistakes: a liveness probe that checks the database, so a database blip restarts every Pod at once, or a timeout too short, causing restart loops under load. Liveness should check only the process itself.

yaml
readinessProbe:
  httpGet: { path: /ready, port: 8080 }
  periodSeconds: 5
livenessProbe:
  httpGet: { path: /healthz, port: 8080 }
  periodSeconds: 10
  failureThreshold: 3
startupProbe:
  httpGet: { path: /healthz, port: 8080 }
  failureThreshold: 30
  periodSeconds: 5

Q22.How does the Horizontal Pod Autoscaler work, and what does it need to scale correctly?

The HPA periodically reads metrics, usually CPU or memory from metrics-server or custom metrics through an adapter, and adjusts a Deployment's replica count to bring the observed value towards the target. Utilisation targets are calculated against container resource requests, so Pods without requests cannot be scaled on CPU properly.

Strong answers mention scaling behaviour settings to avoid flapping, KEDA for event-driven scaling on queue length, and that more Pods need cluster capacity from Cluster Autoscaler or Karpenter.

Q23.What is the difference between an Ingress and the Gateway API in Kubernetes?

Ingress is the original API for HTTP routing into a cluster, handled by a controller such as ingress-nginx. It is simple but limited, and advanced features live in controller-specific annotations that are not portable.

The Gateway API is its role-oriented successor: platform teams own GatewayClass and Gateway resources, while app teams attach HTTPRoute objects. It supports header matching, traffic splitting and more protocols natively. In 2026 it is the recommended direction for new clusters, especially as ingress-nginx has been retired.

Q24.Compare EC2, ECS, EKS and Lambda. How would you choose between them?

EC2 gives virtual machines with full control and full responsibility for patching and scaling. ECS is AWS's own container orchestrator, simpler than Kubernetes, and runs on EC2 or Fargate. EKS is managed Kubernetes: portable and powerful, but with more operational overhead. Lambda runs functions on demand, scaling to zero, with execution time limits and cold starts.

Choose based on team skill and workload shape. A small team with a few services often does better on ECS Fargate than EKS. Lambda fits spiky, event-driven work.

DevOps Interview Questions for Experienced (3+ Years)

11 questions

Q25.Compare rolling, blue-green and canary deployments. When would you use each?

Rolling updates replace instances gradually and are the Kubernetes default; cheap, but old and new versions serve traffic together and rollback is another rollout. Blue-green runs a full new environment and switches traffic at once, giving instant rollback at double the cost during the switch. Canary sends a small percentage of traffic to the new version and widens it while metrics stay healthy.

Strong candidates mention automated canary analysis with Argo Rollouts or Flagger, and backward-compatible database migrations, which every strategy needs.

Q26.What is GitOps, and how does Argo CD implement it?

GitOps means the desired state of your clusters lives in Git, and an agent inside the cluster continuously pulls and reconciles it, rather than CI pushing with cluster credentials. Every change is a reviewed commit, and rollback is a revert.

Argo CD watches repositories of manifests, Helm charts or Kustomize overlays, compares them with live state, reports drift and syncs automatically or on approval. Good answers cover the app-of-apps or ApplicationSet pattern, sync waves, and keeping secrets out of Git using External Secrets or Sealed Secrets.

yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata: { name: api-prod, namespace: argocd }
spec:
  project: default
  source:
    repoURL: https://github.com/acme/deploy.git
    path: apps/api/overlays/prod
    targetRevision: main
  destination: { server: https://kubernetes.default.svc, namespace: api }
  syncPolicy:
    automated: { prune: true, selfHeal: true }

Q27.How do you manage secrets across CI, Kubernetes and applications in a mature setup?

Use a central secret store such as HashiCorp Vault or AWS Secrets Manager as the source of truth. Pipelines authenticate with OIDC rather than stored keys. Kubernetes workloads get secrets through External Secrets Operator or the Secrets Store CSI driver, and Pods access cloud APIs through workload identity such as EKS Pod Identity or IRSA.

Mature answers cover rotation, Vault dynamic database credentials with short TTLs, audit logs, and secret scanning on commits. Saying secrets live in environment variables in the repo is an immediate red flag.

Q28.What is infrastructure drift, how do you detect it, and how should you respond?

Drift is when real infrastructure no longer matches code, usually from console hotfixes, other tools or auto-scaling changes. Detect it by running terraform plan -detailed-exitcode on a schedule and alerting on exit code 2, or by using platform features in Terraform Cloud or Spacelift.

The response depends on intent: if the manual change was correct, codify it; if not, re-apply to restore the declared state. Long term, reduce console write access in production and use ignore_changes only for attributes genuinely managed elsewhere.

Q29.What is OpenTofu, and how would you decide between it and Terraform?

OpenTofu is the open-source fork of Terraform created under the Linux Foundation after HashiCorp moved Terraform to the Business Source License in 2023. It remains largely compatible with Terraform configurations and providers, and has added its own features such as client-side state encryption.

The decision is mostly about licensing, vendor relationship and ecosystem. If you rely on HCP Terraform or Terraform Enterprise, stay. If licence terms matter for your product or you want community governance, OpenTofu is viable. Pin versions and test migration in non-production first.

Q30.How do you define SLIs and SLOs, and how do error budgets change release decisions?

An SLI is a measured ratio of good events to total events, such as successful requests under 300 ms divided by all requests. An SLO is the target for that SLI over a window, for example 99.9 percent over 28 days. The error budget is what remains: 0.1 percent of requests may fail.

When the budget is healthy, teams ship faster; when it is exhausted, they prioritise reliability work. Alert on burn rate across multiple windows rather than raw thresholds, so pages mean real user impact.

promql
# 5xx error ratio over 5 minutes
sum(rate(http_requests_total{code=~"5.."}[5m]))
/
sum(rate(http_requests_total[5m]))

Q31.How would you design observability for a microservices platform using OpenTelemetry?

Instrument services with OpenTelemetry SDKs and auto-instrumentation so traces, metrics and logs share context such as trace IDs and resource attributes. Send everything to an OpenTelemetry Collector, which batches, filters, samples and routes to backends such as Prometheus or Mimir, Loki, and Tempo or Jaeger, viewed in Grafana.

Senior answers discuss cardinality control on metric labels, tail-based sampling to keep error traces, structured JSON logs, and dashboards built around the RED or USE methods instead of every possible graph.

Q32.What are the DORA metrics, and how would you use them without gaming them?

The four classic DORA metrics are deployment frequency, lead time for changes, change failure rate and time to restore service, with newer reports also treating rework rate and reliability separately. Together they balance speed and stability.

Use them as team-level trend indicators to find bottlenecks, such as slow code review or flaky tests, never as individual performance targets. Gaming is easy: splitting deploys inflates frequency. Strong candidates mention collecting them automatically from Git, CI and incident tools rather than spreadsheets.

Q33.How do you run an incident, and what makes a good postmortem?

Declare the incident early, assign an incident commander who coordinates rather than debugs, a communications lead, and responders. Focus on mitigation first, such as rollback, failover or feature flag off, before root cause. Keep a timestamped timeline in the incident channel.

A good postmortem is blameless, covers impact, timeline, detection, root cause and contributing factors, and produces a few owned, dated action items. A weak one ends with human error and retraining, which fixes nothing systemic.

Q34.How do you secure the software supply chain in a CI/CD pipeline?

Layer controls: SAST and secret scanning on pull requests, dependency scanning for known vulnerabilities, and container image scanning with tools such as Trivy or Grype. Generate an SBOM for each image, sign images with Sigstore cosign, and record build provenance aligned with SLSA.

At deploy time, enforce policy with an admission controller such as Kyverno or OPA Gatekeeper so only signed images from trusted registries run. Pin actions and base images by digest. Interviewers value prioritising exploitable findings over blocking builds on every low-severity CVE.

Q35.What levers do you use to reduce cloud costs without hurting reliability?

Start with visibility: tag resources by team and service, and use Cost Explorer or Kubecost to find the largest spenders. Then rightsize instances and Kubernetes requests based on actual usage, use Savings Plans for steady baseline load, and Spot instances for fault-tolerant workloads through Karpenter.

Other common wins are shutting down non-production environments at night, S3 lifecycle policies, Graviton instances, and reducing NAT gateway and cross-AZ data transfer. Strong candidates quantify savings and set budget alerts so costs do not creep back.

DevOps Scenario-Based Interview Questions

8 questions

Q36.A production server reports "No space left on device" but df shows free space. What do you check?

First check inodes with df -i; millions of tiny files, such as session or cache files, can exhaust inodes while bytes remain free. Next, look for deleted files still held open by a process using lsof +L1; the space is not freed until the process restarts or the log is truncated.

Also confirm which mount is actually full, since /var or a container overlay may differ from /. Fix the immediate issue, then add log rotation, inode and disk alerts so it never surprises you again.

bash
df -h; df -i
sudo du -xh --max-depth=1 /var | sort -h | tail
sudo lsof +L1 | head
sudo journalctl --vacuum-size=500M

Q37.Load average on a 4-core VM is 20, yet CPU usage looks low. How do you investigate?

On Linux, load average counts processes that are runnable and those in uninterruptible sleep, usually waiting on disk or network storage. High load with low CPU therefore points to I/O wait. Check the wa value in top, then use iostat -x and iotop to find the saturated device and the processes driving it.

Common culprits are a stuck NFS mount, an EBS volume hitting its IOPS limit, or heavy swapping. Explaining what load average really measures is what interviewers are testing here.

Q38.Pods keep restarting with OOMKilled after a release. What do you do?

Confirm with kubectl describe pod that the last state is OOMKilled with exit code 137, and compare memory usage against the container limit in your metrics. Roll back if users are affected. Then decide whether the limit is too low for legitimate new behaviour or the release introduced a leak or unbounded cache.

Check runtime settings: a JVM or Node process may not size its heap to the container limit. Set requests close to real usage, and profile the new version under load before raising limits blindly.

Q39.A Kubernetes rollout is stuck with new Pods in CrashLoopBackOff. Walk me through your debugging.

Check kubectl rollout status and kubectl get pods, then kubectl describe pod for events and kubectl logs --previous for the last crashed container's output. Typical causes are a missing ConfigMap key or Secret, a bad environment variable, a failing migration, wrong command, or a liveness probe killing a slow-starting app.

Because a rolling update keeps old Pods serving while new ones fail readiness, users may be unaffected. Use kubectl rollout undo if needed, then fix forward in Git if you use GitOps.

bash
kubectl rollout status deploy/api -n prod
kubectl get pods -n prod -l app=api
kubectl describe pod api-7c9f8-xk2lp -n prod
kubectl logs api-7c9f8-xk2lp -n prod --previous
kubectl rollout undo deploy/api -n prod

Q40.Users report the site is down after a DNS change, but it works for you. What is going on?

Most likely DNS caching. Resolvers keep the old record until its TTL expires, so different users see different answers. Check with dig against several public resolvers and the authoritative server, and confirm the record and TTL you actually published.

Also verify the TLS certificate covers the new hostname and the new target accepts traffic. The lesson interviewers want: lower the TTL a day before planned migrations, keep the old target serving during the transition, and raise the TTL again afterwards.

Q41.Your CI pipeline has grown from 8 to 35 minutes and developers are complaining. How do you bring it down?

Measure first: look at per-job and per-step timings over recent runs to find the real bottleneck rather than guessing. Common fixes are dependency and Docker layer caching, parallelising or sharding tests, running only affected projects in a monorepo, and moving slow end-to-end suites to run after merge or on a schedule.

Also check for flaky tests causing retries and undersized runners. Set a time budget for the pipeline and track it, because it creeps back without an owner.

Q42.An AWS access key was accidentally pushed to a public GitHub repository. What are your next steps?

Treat it as compromised immediately. Deactivate and delete the key in IAM first; rewriting Git history comes later and does not undo exposure, since bots scrape public repositories within minutes. Check CloudTrail for activity by that key, looking for new IAM users, unusual regions or crypto-mining instances, and remove anything created.

Then rotate any other secrets in the same repository, purge history, and enable push protection for secret scanning. The real fix is moving CI to OIDC so long-lived keys do not exist.

Q43.Someone changed a security group in the AWS console and the next terraform plan wants to revert it during a release. What do you do?

Do not apply blindly in the middle of a release. Find out who made the change and why; it may have been an emergency fix keeping production working. If the change is correct, update the Terraform code to match, or import the new rule, so plan comes back clean.

If it was a mistake, apply to restore the declared state outside the release window. Afterwards, restrict console write access in production, add scheduled drift detection, and document a break-glass process for emergency changes.

From answers to offers

Prepare for DevOps interviews with practicing engineers

If these answers expose gaps in hands-on work, the program has you build real pipelines, Terraform and Kubernetes setups on AWS, with trainer-led mock interviews before you apply.