Interview preparation · Foundation to advanced

DevOps interview questions and answers

Practise explaining how infrastructure works, diagnosing production failures and making safe changes. This DevOps question set connects cloud, containers, delivery, networking, observability and security instead of treating each tool as an isolated definition.

Practise DevOps interviews

Topics in this question bank

Cloud platforms and workload identity; orchestration and containers; infrastructure as code; pipelines and Git; Linux and networking; reliability and DevSecOps; Python automation.

How to prepare your answers

For a junior role, start with workload identity, container behavior, version control and basic troubleshooting. For a senior role, explain recovery objectives, rollout boundaries, capacity limits and the evidence that would justify a production decision. State assumptions about your environment before choosing a solution.

In general preparation, choose at least three topics and your target level. For a specific job, enter the technologies required and your current skills. Keyword matching selects supported topics; it does not infer proficiency from a resume or generate new questions.

Sample DevOps questions with expected answers

These examples are a starting point for focused interview preparation. Accept other technically sound approaches and check the primary references for the relevant environment and version.

AWS · foundation

How would you let an EC2 application read a private S3 bucket securely?

Attach an IAM role through an instance profile, grant only the required S3 actions on the required resources, and let the AWS SDK obtain temporary credentials. Check bucket policies and encryption-key permissions as well as the role policy. Avoid embedding long-lived access keys in the application.

Follow-up: How would this change for a workload running outside AWS?

A stronger answer: Explains federation and distinguishes role permissions from the role trust policy.

Read the primary reference

Kubernetes · foundation

How do Deployments differ from StatefulSets?

Deployments suit interchangeable replicas. StatefulSets provide stable identities and ordered behavior useful for some stateful workloads, with persistent-volume integration. They do not automatically implement database replication, backup or safe failover.

Follow-up: Does a StatefulSet make a database highly available?

A stronger answer: Separates orchestration features from application guarantees.

Read the primary reference

GitLab CI/CD · foundation

What is the difference between a GitLab runner and a job?

A job declares work in pipeline configuration; a runner picks up eligible jobs and executes them using a configured executor. Tags, permissions and runner availability influence assignment. The YAML does not itself supply compute.

Follow-up: Why can a job remain pending with idle runners?

A stronger answer: Checks eligibility as well as capacity.

Read the primary reference

Terraform · foundation

What does a Terraform plan tell a reviewer?

It describes proposed resource changes based on configuration, state and provider reads. Review replacements and unknown values as well as additions. The plan is not a guarantee that external state or credentials will stay unchanged until apply.

Follow-up: Why might a later apply differ from an earlier preview?

A stronger answer: Accounts for timing and provider behavior.

Read the primary reference

Python automation · foundation

When is Python preferable to a shell pipeline for automation?

Python can clarify structured data, error handling and reusable logic when shell composition becomes fragile. Still define command boundaries and portability; changing the language alone does not make an operation safe or idempotent.

Follow-up: Which part is difficult to express reliably in shell?

A stronger answer: Chooses tools from the task.

Read the primary reference

Linux · foundation

How do file ownership and permission bits determine access?

The kernel evaluates ownership, group membership and mode bits, with ACLs and other controls potentially adding rules. Directory execute permission governs traversal. Use the narrowest changes needed rather than applying recursive world-writable permissions.

Follow-up: Why can a readable file remain inaccessible through its parent directory?

A stronger answer: Checks the full path.

Read the primary reference

DevSecOps · foundation

How do SAST, DAST and dependency scanning differ?

SAST examines source or related code representations, DAST tests a running application from the outside, and dependency scanning checks third-party components for known risks. Each has coverage gaps and false positives. Use them together with review and appropriate verification rather than treating a clean report as proof of security.

Follow-up: Which of these is most likely to identify a known vulnerable library version?

A stronger answer: Separates detection coverage from exploitability and remediation priority.

Read the primary reference

Observability · foundation

How do metrics, logs and traces help diagnose a production issue?

Metrics summarise behaviour over time, logs record events and traces show work across a request’s path. Correlate them using useful context such as timestamps, service identity and trace IDs. Choose instrumentation around the questions operators need to answer and avoid collecting sensitive data indiscriminately.

Follow-up: When could an average latency metric hide a serious user problem?

A stronger answer: Includes latency distributions and tail behaviour.

Read the primary reference

Using these questions as an interviewer

Ask for a diagnostic sequence before asking for a command. Useful evidence includes what the candidate would measure, which failure boundary they suspect, how they would limit blast radius and how they would confirm recovery.

In the interviewer workspace, enter role requirements and candidate skills, inspect the keyword-based skill map and build a plan. Reveal guides as needed, replace questions, record notes and assess the candidate yourself. The app does not provide semantic grading or a hiring score.

Start a focused practice session

Learn mode lets you reveal guides at your own pace. Practice asks you to answer first and provides a phrase-based concept check. Mock keeps guides hidden until you finish. Optional speech input and spoken questions depend on browser support; typed answers are always available in the workspace.

Regular practice is free without an account. Verified members can also access optional AI coaching, subject to usage limits and availability. Job and resume drafts stay in memory; optional member AI matching sends them to Gemini only after separate permission. Saved answers and notes use this browser's local storage. Export JSON or print the completed-session review when you need a copy.

Open DevOps practice