Troubleshooting Questions

DevOps and CloudOps | 56 questions | 2026

DevOps Troubleshooting Interview Questions and Answers

Real production scenarios: outages, slow apps, failed deploys. Tap a question to open the model answer, most asked first.

DevOps Troubleshooting interview questions for freshers 20

Q1FresherMost askedScenario

Which cloud providers and services do you know, and how comfortable are you with GCP and Azure compared with AWS?

Answer

Name what you have used. Show that you know the matching services in other clouds.

NeedAWSAzureGCP
Virtual machinesEC2Virtual MachinesCompute Engine
Object storageS3Blob StorageCloud Storage
Managed KubernetesEKSAKSGKE
Serverless functionsLambdaFunctionsCloud Functions
Serverless containersFargateContainer AppsCloud Run
Managed SQLRDSAzure SQLCloud SQL
IAMIAMEntra ID and RBACIAM

Sample answer: "I have the most hands-on experience with AWS ([your services]). I have used [GCP/Azure services] for [your project]. The ideas (networks, IAM, compute, storage) carry over. So I can learn the rest quickly from documentation and infrastructure as code." Be honest, and give a real project.

What they are checking: Whether you are honest about experience and understand the common concepts across clouds.

Q2FresherMost askedScenario

How do you troubleshoot a failing Kubernetes application, including an unhealthy pod?

Answer

Work from the outside in: status, events, logs, then a shell inside the container.

kubectl get pods -n app                     # status: Pending, CrashLoopBackOff, ImagePullBackOff
kubectl describe pod web-7d9 -n app         # events: scheduling, probes, OOMKilled, image errors
kubectl logs web-7d9 -n app --previous      # logs of the last crashed container
kubectl exec -it web-7d9 -n app -- sh       # look around inside
kubectl get events -n app --sort-by=.lastTimestamp
  • Pending: not enough resources, taints, or an unbound PVC.
  • ImagePullBackOff: wrong image name or tag, or a missing registry secret.
  • CrashLoopBackOff: the app exits, so read the previous logs; check env vars, config and probes.
  • OOMKilled: raise memory limits or fix the leak.

If the image has no shell, use kubectl debug -it web-7d9 --image=busybox --target=web.

What they are checking: Whether you have a repeatable kubectl debugging routine rather than guessing.

Q3FresherMost askedScenario

How do you monitor CPU, memory and processes on a Linux server?

Answer

Use built-in tools for a quick look. Use a metrics agent for history.

  • top / htop: live CPU, memory and per-process usage. Sort by CPU or memory.
  • free -h: memory and swap. Look at "available", not "free".
  • vmstat 1 and iostat -x 1: run queue, swapping and disk wait.
  • ps aux --sort=-%mem | head: the top memory users.
  • uptime: load average. Compare it with the number of cores (nproc).
  • df -h and du -sh: disk space.

For long-term monitoring, run Node Exporter with Prometheus and Grafana, or the CloudWatch agent. Alert on high CPU, low available memory and full disks.

What they are checking: Whether you know the basic Linux toolkit and the difference between live checks and ongoing monitoring.

Q4FresherScenario

How would you run a database with persistent storage locally and on Kubernetes?

Answer

Keep data outside the container's writable layer so it survives restarts.

  • Locally with Docker: use a named volume.
docker run -d --name pg -e POSTGRES_PASSWORD=secret \
  -v pgdata:/var/lib/postgresql/data -p 5432:5432 postgres:16
  • On Kubernetes: use a StatefulSet with volumeClaimTemplates. Each pod gets a stable name and its own PersistentVolumeClaim. A StorageClass backs it (for example the EBS CSI driver), so data stays after the pod moves. A headless Service gives stable DNS names. Store passwords in Secrets.

For production, a managed database such as RDS is usually safer than running your own. Backups, failover and patching are handled for you.

What they are checking: Whether you know volumes, PVCs and why StatefulSets exist.

Q5FresherScenario

How would you build an ETL pipeline with a graphical tool? How would you load files from S3 into a data warehouse with fast queries?

Answer

ETL means extract, transform, load.

  • Extract: read files from S3 (CSV, JSON, Parquet) or databases.
  • Transform: clean the data. Drop or fill nulls, remove duplicates, fix types and formats, and join sources. In a graphical tool such as AWS Glue Studio, Talend or Azure Data Factory, you drag source, transform and target nodes and set the rules.
  • Load: write into the warehouse. For Redshift use COPY from S3 (parallel and fast). For Snowflake use COPY INTO from a stage.
COPY sales FROM 's3://my-bucket/sales/'
IAM_ROLE 'arn:aws:iam::123456789012:role/redshift-load'
FORMAT AS PARQUET;
  • Make queries fast: use columnar formats (Parquet), partitioned files, good distribution and sort keys, and compression. Avoid SELECT *. Use pre-aggregated tables.
  • Schedule the job. Add data quality checks and alerts.

What they are checking: Whether you understand ETL stages and the basics of warehouse loading.

Q6FresherScenario

Walk through how a web application is built, deployed and made available on the internet.

Answer

The path from code to a live site, in a few steps.

  1. Build: develop the front end (HTML, CSS, JavaScript framework) and the backend API. Store data in a database. Keep code in Git.
  2. Package: build the app, or a Docker image.
  3. Infrastructure: a server or cloud service (VM, container service, or static hosting), a database, and a firewall that opens only ports 80 and 443.
  4. Deploy: a CI/CD pipeline (GitHub Actions) tests, builds and ships the release. A web server such as Nginx serves the app and sends requests on to the backend.
  5. Domain and HTTPS: point a DNS record to the server or load balancer. Add a TLS certificate (Let's Encrypt or ACM).
  6. Operate: logs, monitoring, backups, and scaling or a CDN for speed.

This also touches operating systems (processes, files), networks (DNS, TCP, HTTP) and web technologies.

What they are checking: Whether you understand the whole lifecycle at a high level and the pieces involved.

Q7FresherScenarioFree with sign-in

What do Prometheus and Grafana do when monitoring Linux instances?

Answer

Prometheus collects and stores metrics. Grafana shows them.

Q8FresherScenarioFree with sign-in

An application works on localhost but is not reachable on its public IP. How do you troubleshoot?

Answer

Check whether the app, the host and the network each allow the traffic.

Q9FresherScenarioFree with sign-in

What causes SSH connection failures, and what file permissions do the keys need?

Answer

Failures usually come from the network, the key, or the user.

Q10FresherScenarioFree with sign-in

How do you set up Nagios to monitor Linux and Windows hosts?

Answer

Nagios runs checks on a schedule using plugins, and agents expose host data.

Q11FresherScenarioFree with sign-in

Write or explain basic SQL queries and database tables.

Answer

SQL lets you create tables and query rows.

Q12FresherScenarioFree with sign-in

How does a backend application connect to a local database?

Answer

The backend uses a driver or ORM with a connection string, host, port and credentials.

Q13FresherScenarioFree with sign-in

Why would you choose Snowflake over Redshift?

Answer

Snowflake separates storage and compute and needs little care. Redshift is tied closer to AWS and its cluster sizing.

Q14FresherScenarioFree with sign-in

Why choose Selenium over Scrapy for scraping, and what are headless browsers?

Answer

Scrapy is a fast crawler for static pages. Selenium controls a real browser for pages that need JavaScript or interaction.

Q15FresherScenarioFree with sign-in

What is RAG and how would you design embeddings for a PDF corpus?

Answer

RAG (retrieval augmented generation) gives a language model relevant documents at question time, so answers are grounded in your data.

Q16FresherScenarioFree with sign-in

What is virtualization, and what are type 1 and type 2 hypervisors?

Answer

Virtualization lets one physical machine run several isolated virtual machines. Each has its own OS. They share the hardware through a hypervisor.

Q17FresherScenarioFree with sign-in

How do you fix a 525 SSL handshake error between Cloudflare and the origin?

Answer

Error 525 means Cloudflare could not finish a TLS handshake with your origin server.

Q18FresherScenarioFree with sign-in

How does the TLS 1.3 handshake work?

Answer

TLS 1.3 sets up an encrypted connection in one round trip.

Q19FresherScenarioFree with sign-in

What are object-oriented programming concepts such as classes and interfaces?

Answer

OOP organises code into objects that combine data and behaviour.

Q20FresherScenarioFree with sign-in

What is event-driven programming? Give an example.

Answer

In event-driven programming, events control the flow of the program. An event can be a click, a message or a file upload. Handlers react to them.

  • An event is a signal that something happened.
  • A handler/listener is code that runs in response.
  • An event loop or broker waits for events and passes them on.

DevOps Troubleshooting interview questions for experienced 36

Q21ExperiencedMost askedScenario

Which logging, metrics and alerting stack would you set up for servers, pods and applications? How do alerts get delivered?

Answer

A common open source answer is Prometheus, Grafana, Loki and Alertmanager.

  • Metrics: Node Exporter for hosts, kube-state-metrics and cAdvisor for Kubernetes, and client libraries for application metrics. Prometheus scrapes (pulls) them. On Kubernetes, use the kube-prometheus-stack Helm chart.
  • Logs: Promtail or Grafana Alloy sends container and system logs to Loki. Query them with LogQL in Grafana.
  • Dashboards: Grafana with Prometheus and Loki as data sources.
  • Alerting: Prometheus alert rules fire to Alertmanager. It groups alerts, removes duplicates, and sends them to Slack, email or PagerDuty by severity and team.
  • Good alerts: alert on symptoms (error rate, latency, pod restarts, pending pods, disk filling within 4 hours). Do not alert on every CPU spike. Each alert should link to a runbook.
  • Managed option: CloudWatch with SNS, or Datadog, when you do not want to run the stack yourself.
- alert: HighErrorRate
  expr: sum(rate(http_requests_total{code=~"5.."}[5m])) / sum(rate(http_requests_total[5m])) > 0.05
  for: 10m
  labels: {severity: page}

What they are checking: Whether you have really built an observability stack and know how alerts reach people.

Q22ExperiencedMost askedScenario

A production EC2 instance has crashed or become unresponsive. How do you investigate and recover it, including when you cannot SSH in?

Answer

First make things stable, then find the cause, then recover. Do not reboot blindly, because you may lose evidence.

  • Check status: look at the EC2 console status checks. A failed system check points to the AWS host. Stop and start the instance to move it to new hardware. A failed instance check points to the OS (kernel panic, full disk, bad fstab).
  • Metrics and logs: look at CloudWatch CPU, credit balance, disk and network graphs. Also read the console output and screenshot (aws ec2 get-console-output --instance-id i-0abc).
  • If SSH fails: try SSM Session Manager first. If that fails, stop the instance and detach the root volume. Attach it to a healthy rescue instance and mount it. Then read /var/log, fix fstab, free disk space or fix sshd_config. Finally reattach the volume and start the instance.
  • If it is just too small: stop it, change the instance type, and start it. Or snapshot the volume and launch a larger instance from it.
  • Avoid a repeat: set alarms on CPU, disk and status checks. Use an Auto Scaling group with health checks so it heals itself. Hold a short review after the incident.
aws ec2 describe-instance-status --instance-ids i-0abc --include-all-instances

What they are checking: Whether you have a calm, ordered recovery process and know the detach-volume rescue trick.

Q23ExperiencedMost askedScenario

How do you find the cause when an application or microservice is slow?

Answer

Start with the user impact, then narrow down layer by layer using data, not guesses.

  1. Scope it: which endpoint, since when, which users? Check recent deploys or config changes.
  2. Golden signals (latency, traffic, errors, saturation) on a Grafana or CloudWatch dashboard.
  3. Resources: CPU throttling, memory pressure and swap, disk I/O, network, connection limits.
  4. Distributed tracing (OpenTelemetry with Jaeger or Tempo, or X-Ray): the slowest span shows which service or call is guilty.
  5. Dependencies: slow SQL (slow query log, pg_stat_statements), locks, cache misses, third-party APIs, DNS.
  6. Logs: correlate by request ID, look for timeouts and retries.
  7. Fix and verify: add an index, cache, scale out (HPA), tune pool sizes, or roll back. Then confirm the latency graph recovered.

The key is to change one thing at a time and measure.

What they are checking: Whether you follow a structured, data driven approach and know tracing.

Q24ExperiencedMost askedScenario

How is Aurora different from RDS? What happens when the writer instance fails in a cluster with one writer and two readers?

Answer

Aurora is AWS's cloud native engine (compatible with MySQL and PostgreSQL). Standard RDS runs the regular engine on EBS volumes.

RDS (Multi-AZ)Aurora
StorageEBS attached to the instanceShared cluster volume, 6 copies over 3 AZs, grows to 128 TiB
ReplicasStandby (not readable) or read replicas, which hold separate copies of dataUp to 15 readers reading the same storage
FailoverUsually 60 to 120 secondsUsually about 30 seconds or less

Writer crash in Aurora: the cluster detects the failure and promotes a reader to writer automatically. It picks by failover priority tier (then size). Readers share storage, so no data copy is needed. The cluster endpoint then points at the new writer, so applications that reconnect keep working. The failed instance is replaced and joins again as a reader. Clients must retry dropped connections. They must use the cluster (writer) endpoint and the reader endpoint, not instance endpoints.

For RDS Multi-AZ, the standby is promoted and DNS flips. So keep the DNS TTL low and retry connections.

What they are checking: Whether you know the shared storage design and how failover is exposed to applications.

Q25ExperiencedScenarioFree with sign-in

How do you diagnose slow SQL queries and database connection limit errors, and how do you monitor databases?

Answer

Look at what the database is doing. Then fix the query or the connection handling.

Q26ExperiencedScenarioFree with sign-in

How do you track AWS costs across accounts and detect anomalies, and how do you approach cloud cost optimisation?

Answer

Make costs visible per team. Set budgets. Then act on the biggest items.

Q27ExperiencedScenarioFree with sign-in

How would you deploy and monitor an application across multiple regions, including a multi-region database with global routing?

Answer

Run active copies in each region. Send users to the nearest healthy one. Replicate data.

Q28ExperiencedScenarioFree with sign-in

Where should you host databases compared to a Kubernetes cluster? How would you self-host one inside Kubernetes with persistence, scaling and consistency?

Answer

Default to a managed database outside the cluster, and self-host only with a good reason.

Q29ExperiencedScenarioFree with sign-in

Which SQL and NoSQL databases have you worked with, and which messaging queue would you use with them?

Answer

Choose by data shape, consistency needs and access pattern.

Q30ExperiencedScenarioFree with sign-in

How do you govern and safely use AI agents, coding tools, plugins and MCP tools in engineering workflows?

Answer

Treat AI tools like any other powerful third party that can reach your code and systems.

Q31ExperiencedScenarioFree with sign-in

Which GCP services have you used for microservice workloads, including serverless containers and managed Kubernetes?

Answer

Pick the service by how much control you need.

Q32ExperiencedScenarioFree with sign-in

What is the difference between Node Exporter and kube-state-metrics?

Answer

They measure different layers.

Q33ExperiencedScenarioFree with sign-in

How do you handle and get alerted about failing or pending pods?

Answer

Alert from metrics. Then investigate with kubectl.

Q34ExperiencedScenarioFree with sign-in

A frontend in Kubernetes cannot reach a backend API. How do you troubleshoot?

Answer

Check each hop between the two, starting at the backend.

Q35ExperiencedScenarioFree with sign-in

How do you find out why a container keeps crashing when you have no metrics? How do you tell a memory kill from an application crash?

Answer

Use the exit information Kubernetes already records.

Q36ExperiencedScenarioFree with sign-in

When do you use HPA versus VPA in Kubernetes?

Answer

HPA adds or removes pod replicas. VPA changes the CPU and memory requests of each pod.

Q37ExperiencedScenarioFree with sign-in

There is a long running blocking write query in production. What do you do, and how should developers be given database access?

Answer

Find the blocker. Decide whether to kill it. Stop it from happening again.

Q38ExperiencedScenarioFree with sign-in

What problems can you hit when migrating a workload from EC2 to EKS?

Answer

Most problems come from what an EC2 app assumes about its machine.

Q39ExperiencedScenarioFree with sign-in

A deployment reports success but the application still serves the previous version. How do you debug it?

Answer

Find out which layer is still serving old content.

Q40ExperiencedScenarioFree with sign-in

How do you debug DNS resolution problems on an EC2 instance?

Answer

Separate the resolver, the DNS records and the network path.

Q41ExperiencedScenarioFree with sign-in

How do you approach a system-down incident?

Answer

Restore service first. Find the root cause second.

Q42ExperiencedScenarioFree with sign-in

How do you change CloudWatch log retention and search logs?

Answer

Retention is set per log group, and search uses Logs Insights or filter patterns.

  • Retention: by default logs never expire, which costs money. Set a retention period in the console, with Terraform (retention_in_days), or the CLI:
Q43ExperiencedScenarioFree with sign-in

How would you set up centralized logging, and when would you choose ELK over Loki?

Answer

Ship logs from every host and pod to one searchable store.

  • Collect: Fluent Bit, Promtail or Grafana Alloy as a DaemonSet or agent, tagging logs with labels like namespace, pod and app. Prefer structured JSON logs with a request ID.
  • Store and search: Loki or Elasticsearch/OpenSearch.
Q44ExperiencedScenarioFree with sign-in

How would you add distributed tracing, APM or profiling to an application on Kubernetes?

Answer

Instrument with OpenTelemetry, collect with a collector, and view in a tracing backend.

Q45ExperiencedScenarioFree with sign-in

How do you monitor uptime and alert on downtime?

Answer

Check from outside the system, as a user would. Alert on failures.

Q46ExperiencedScenarioFree with sign-in

What are AWS Global Databases and when do you use them?

Answer

Aurora Global Database spans multiple regions. It has one primary region and read-only secondary regions. It copies data at the storage level.

Q47ExperiencedScenarioFree with sign-in

In which subnets should RDS be deployed, and how do developers access it securely?

Answer

Put RDS in private subnets. Never expose it to the internet.

Q48ExperiencedScenarioFree with sign-in

How do you back up stateful databases for disaster recovery, including cross region and cross account restore?

Answer

Combine automated backups, copies in another region and account, and tested restores.

Q49ExperiencedScenarioFree with sign-in

How do you plan database backups, full versus incremental, and which database engines have you managed?

Answer

Choose by recovery targets: how much data you can lose (RPO) and how fast you must be back (RTO).

Q50ExperiencedScenarioFree with sign-in

Do you have experience with DynamoDB indexing?

Answer

DynamoDB queries must use a key, so indexes give you extra access patterns.

Q51ExperiencedScenarioFree with sign-in

Have you deployed AI models on a cloud platform, and how did you expose them?

Answer

Describe the path from model to a secure, scalable endpoint.

Q52ExperiencedScenarioFree with sign-in

How would you create 50 VMs on vSphere or ESXi?

Answer

Automate it from a template instead of clicking 50 times.

  • Template: build one VM, install the OS and agents, generalise it (cloud-init or sysprep), and convert it to a template.
  • Terraform with the vSphere provider:
Q53ExperiencedScenarioFree with sign-in

How do you avoid accidentally changing production when you think you are working in development?

Answer

Make the environments hard to confuse and hard to touch by accident.

Q54ExperiencedScenarioFree with sign-in

What challenges arise when managing many resources at production scale?

Answer

Scale turns small issues into daily problems.

Q55ExperiencedScenarioFree with sign-in

How do you troubleshoot an access denied error from an ECS service, and what is a trust policy?

Answer

First find which role is making the call, and which policy is missing or blocking it.

Q56ExperiencedScenarioFree with sign-in

Describe your experience with Azure, AWS and GCP and the infrastructure as code and CI/CD tools you use.

Answer

Give a short map of what you built. Then name the tooling.

Test yourself on TroubleshootingQuick MCQs, right or wrong shown instantlyStart

More DevOps interview questions