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 76–90 of 490 questions

76.How do you share an internal Python tool?SeniorPython for DevOps

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.

77.What does a Kubernetes operator do?SeniorPython for DevOps

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.

78.What makes an operator handler well written?SeniorPython for DevOps

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

79.What do FastAPI and pydantic give you?SeniorPython for DevOps

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

80.How do you keep Python code quality high across many teams?SeniorPython for DevOps

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.

81.What is the difference between a function and a module?BeginnerPython for DevOps

A function is a named block of steps you can call again and again. A module is a .py file that holds functions and other code, so you can import and share them.

82.What does a --dry-run flag do, and why add it?MidPython for DevOps

It shows what the tool would change without changing anything. People can check the result first, so a mistake costs nothing.

83.How do you stop a script from hanging on a slow command or API?SeniorPython for DevOps

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.

84.A user asks the API to start a 10-minute deploy. How do you design the endpoint?SeniorPython for DevOps

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.

85.What is an artifact repository and why use one?BeginnerJFrog Artifactory & Nexus

It stores files that builds make and use, such as packages and images, with versions. It gives you one safe place, a cache of public libraries, access control and a record of what was built. Builds become faster and repeatable.

86.What does 'build once, deploy many' mean?BeginnerJFrog Artifactory & Nexus

You build an artifact one time and move that same file through dev, test and prod. You never rebuild for production, because a rebuild may differ from what you tested.

87.What are local, remote and virtual repositories?BeginnerJFrog Artifactory & Nexus

Local holds your own files. Remote caches another site such as Maven Central. Virtual gives one address in front of both, so tools need only one URL.

88.What is the difference between a release and a snapshot version?BeginnerJFrog Artifactory & Nexus

A release such as 1.4.2 is fixed and should never be overwritten. A snapshot such as 1.5.0-SNAPSHOT is work in progress and is replaced by each build. Keep them in separate repositories.

89.Why should passwords not go in pom.xml?BeginnerJFrog Artifactory & Nexus

The pom is committed to Git, so secrets would leak. Put credentials in settings.xml or in CI variables, and use tokens.

90.Why use a digest instead of a tag for production images?MidJFrog Artifactory & Nexus

A tag can be moved to a different image. A digest is a fingerprint of the content, so it always means exactly one image.