Skip to content
$ lynuxpro

INTERVIEW PREP

Interview questions

570 questions from real DevOps, SRE, platform engineering and MLOps interviews, with the answer an interviewer wants to hear. Try answering out loud first, then open the model answer.

Showing 1–11 of 11 questions

Learn Python for DevOps →
1.What is a paginator in boto3?Senior

A helper that follows the page tokens of an AWS API for you, so you get every result rather than only the first page.

2.How should a Python script get AWS credentials in production?Senior

From an IAM role attached to the compute (EC2, ECS, Lambda or an EKS service account). No long-lived keys in code or files.

3.load_kube_config or load_incluster_config?Senior

load_kube_config reads your local kubeconfig and suits laptops. load_incluster_config uses the pod's service account and suits code running in the cluster.

4.Threads, asyncio or processes?Senior

Threads for a moderate number of I/O waits, asyncio for very many connections with async libraries, processes for CPU-heavy work. Always limit concurrency.

5.How do you share an internal Python tool?Senior

Describe it in pyproject.toml with a script entry point, build with python -m build, publish to a private index, and install with pipx or pip.

6.What does a Kubernetes operator do?Senior

It watches a custom resource and runs a reconcile loop to make the real state match the wanted state. With kopf you write handlers for create, update and delete.

7.What makes an operator handler well written?Senior

It is idempotent, sets owner references on child objects, writes status, cleans up on delete, and runs with least-privilege RBAC.

8.What do FastAPI and pydantic give you?Senior

Typed request models with automatic validation (422 on bad input), generated interactive docs, and clear dependency injection for things like authentication.

9.How do you keep Python code quality high across many teams?Senior

Type hints with mypy, ruff for lint and format, pytest with coverage, pre-commit hooks, the same checks in CI as a required gate, dependency audits, and shared project templates.

10.How do you stop a script from hanging on a slow command or API?Senior

Set a timeout on every outside call: timeout= in requests and subprocess.run, and a limit on retries. Without one, a single stuck call can hang the whole job.

11.A user asks the API to start a 10-minute deploy. How do you design the endpoint?Senior

Check the input and the caller's permissions, put the job in a queue or background worker, and return 202 with a job id right away. Provide a status endpoint, log who started it, and make the job safe to run twice.