Part A — Kubernetes: Pod/Container Crash Debugging
You are on call and a service deployed to Kubernetes starts failing. The Pod shows CrashLoopBackOff (or the container exits repeatedly).
-
Walk through a
systematic, step-by-step
process to debug the issue.
-
What are the most common root causes you would check for first?
-
What Kubernetes commands and signals (events, logs, status fields) would you use?
Part B — Kubernetes Probes
Explain the following probe types and when to use each:
-
Liveness probe
-
Readiness probe
-
Startup probe
Include:
-
What problem each probe solves
-
Typical failure modes and pitfalls (e.g., causing restart loops)
-
Example probe choices for (i) a fast-starting stateless API, (ii) a slow-starting JVM app, (iii) an app that depends on a downstream database
Part C — Python ETL/Script Code Review
You are given a small Python script that:
-
reads a local file, 2) performs simple processing, and 3) writes rows into a SQL database.
A simplified version looks like:
-
Open file and read entire content into memory
-
For each line: parse/split fields and do minimal transformation
-
For each record: build an SQL string and execute an INSERT
-
Commit at the end
List the major issues you would call out in a code review (correctness, reliability, security, performance, operations). Propose concrete improvements suitable for production.