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 475 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 happens when you run mvn package?BeginnerMaven & Build Tools
Maven runs every lifecycle phase up to package in order: validate, compile, test, then package. Each phase runs the plugin goals bound to it, producing the jar in target/.
86.What are dependency scopes?BeginnerMaven & Build Tools
compile (default, everywhere), provided (compile only, the runtime supplies it), runtime (not for compiling), test (tests only), and system/import. Scope controls the classpath and whether the dependency is packaged.
87.What is a POM file?BeginnerMaven & Build Tools
pom.xml describes a Maven project: its coordinates (groupId, artifactId, version), dependencies, plugins, packaging and build settings. Maven reads it to know what to download and how to build.
88.What are Maven coordinates?BeginnerMaven & Build Tools
groupId:artifactId:version (plus packaging and classifier) uniquely names an artifact, for example org.springframework:spring-core:6.1.2. Repositories store artifacts by these coordinates.
89.What are the main phases of the Maven lifecycle?BeginnerMaven & Build Tools
validate, compile, test, package, verify, install and deploy. Running a phase runs every phase before it, so mvn install also compiles, tests and packages.
90.What is the difference between mvn install and mvn deploy?BeginnerMaven & Build Tools
install copies the built artifact into your local repository (~/.m2) so other local projects can use it. deploy uploads it to a remote repository like Artifactory or Nexus for everyone.