BayLearn Interview Sprints
Cloud DevOps Interview Sprint — Deploy It. Automate It. Operate It.
Prepare for modern DevOps, Platform and Cloud interviews with Docker, Kubernetes, Terraform, CI/CD, production troubleshooting and a realistic hands-on deployment challenge.
Refund terms are drafted and are not a current offer. Refund policy
Curriculum
Short lessons in interview order. The production lab runs on your machine with kind and Terraform — BayLearn does not execute candidate clusters.
You will
- See the full lesson path before you book
- Know this is a production DevOps interview sprint, not a command dump
Course overview5 min
Course overview
Cloud DevOps Interview Sprint
Four hours. Docker, Kubernetes on kind, Terraform 1.11+, CI/CD, and production operations. You package a backend, deploy it, write the supporting infrastructure as code, promote the same digest, break something realistic, fix it, and sit a scored mock.
This is not three certification courses squeezed into a weekend. Interviewers want you to walk Browser → DNS → load balancer → Ingress → Service → Pod → database. Listing kubectl flags is not enough. Treating DynamoDB as the Terraform locking story is also not enough.
Promise
You deploy a real workload, automate the path that built the digest, and operate the system when it lies. You leave with a readiness report and a 7-day plan. The score measures rehearsal against the BayLearn Cloud DevOps rubric. It does not predict hiring.
The certificate is a BayLearn Certificate of Completion: Cloud DevOps Interview Sprint — Docker + Kubernetes + Terraform. That means you finished this course. It is not CKA, CKAD, Terraform Associate, or any other industry certification.
Journey
text
ASSESS → CONTAINERIZE → ORCHESTRATE → PROVISION → AUTOMATE → OBSERVE → BREAK/FIX → MOCK → FEEDBACKWhat interviews actually test
Can you ship a digest, keep traffic on Ready pods, lock remote state, and narrate TRACE when the page goes off? A typical loop looks like this:
- Package the Order API so PID 1 is the server, the user is not root, and the image has no secrets.
- Deploy it on Kubernetes with probes, requests, and a ClusterIP — then explain why NodePort is not the default internet path.
- Show an S3 backend with
use_lockfile = true(Terraform 1.11+) and refuse a new DynamoDB lock table as “modern.” - Promote the same digest through CI, then TRACE a 502 without restarting the cluster.
If you cannot walk those four out loud, dumping commands will not help.
The four-hour agenda
| Module | Time | Topic |
|---|---|---|
| 0 | 15 min | DevOps Readiness Assessment |
| 1 | 35 min | Docker & Container Engineering |
| 2 | 45 min | Kubernetes Interview Essentials |
| 3 | 40 min | Terraform & Infrastructure as Code |
| 4 | 35 min | CI/CD, Cloud & Production Operations |
| 5 | 35 min | Hands-On Production Challenge |
| 6 | 45–60 min | DevOps Mock Interview |
| 7 | 10 min | Feedback & 7-Day Plan |
Live 1:1 usually lands between 3h45m and 4h15m. If you are self-paced, budget four to five hours including the lab.
Who this is for
DevOps Engineer, Senior DevOps Engineer, Cloud Engineer, Platform Engineer, SRE, and Infrastructure Engineer. Tracks in the mock: DEVOPS_ENGINEER, SENIOR_DEVOPS_ENGINEER, PLATFORM_ENGINEER, SRE, LEAD_PLATFORM_ENGINEER.
What this sprint is not
- Not a second AWS Solutions Architect course. Optional AWS names appear only as a mapping table (EKS, ALB, ECR) after you can explain the portable path.
- Not Helm/Kustomize as a four-hour requirement.
- Not minikube. Local clusters are kind only.
- Not “Kubernetes Secrets are encrypted, so we are done.”
How to study
Say answers out loud. Ten questions spoken beat fifty skims. After each lesson, pick the Order API and teach the decision as if a staff engineer is sitting across from you.
Open the course overview next, then Module 0.
Instructor: BayAreaLa8s Team. Prices load from central configuration — do not expect amounts in this curriculum.
Start here
Start here
Course overview — how to use this sprint
In one sentence: Spend four hours practicing the interview loop — deploy a digest, automate promotion, operate the failure — not collecting flags from three vendor exams.
Before you start
You need a laptop that can run Docker Engine and kind (v0.30+, around v0.33). Terraform must be 1.11 or newer so S3 use_lockfile is the locking story you tell. The sample Order API is Python 3.12+; you are packaging it, not taking a FastAPI course.
You do not need an AWS account to finish the sprint. The production lab (LAB-CD-501) is local: Docker build, kind apply, Terraform validate/plan, a documented CI workflow. An optional EKS mapping table exists for interviews that name cloud products. It is not a second curriculum.
How the player is organized
| Surface | What it is |
|---|---|
| Module 0 | 25-question readiness (cd-readiness-v1). Nine skill bars. Bands 0–40 Foundation, 41–60 Developing, 61–75 Interview Capable, 76–90 Interview Ready, 91–100 Advanced. |
| Modules 1–4 | Lessons, diagrams, knowledge checks. Speak answers; do not highlight-and-forget. |
| Challenges | 27 configuration fixes (Docker, Kubernetes, Terraform, CI/CD). Solutions stay hidden until you attempt. |
| Module 5 | Production deployment lab + break/fix. You run commands locally. BayLearn does not execute your cluster. |
| Module 6 | One of five mock modes. Dimensions are 1–5; weights are in the scorecard. |
| Module 7 | Keep / change / 7-day plan. Repeat the disclaimer out loud. |
| Downloads | 23 cheatsheets. Use them after you can teach the table, not instead of teaching it. |
Positioning you will hear all day
Deploy it. A pinned, non-root image. A Deployment that only receives traffic when Ready. Manifests you could re-apply on Monday.
Automate it. The same digest moves through CI. Terraform plan is reviewed; apply is locked. Git is the source of what production should be.
Operate it. TRACE first: Triage Impact, Review Recent Changes, Analyze Signals, Check Dependencies & Capacity, Execute Mitigation then Eliminate Root Cause. Ready on a dependency is not innocence.
Tool versions you should say in an interview
Checked 13 September 2026. Full table: docs/interview-sprints/cloud-devops/TOOL_VERSION_POLICY.md.
| Tool | What you say |
|---|---|
| Kubernetes | 1.31–1.37 supported; lab APIs are 1.31+ |
| kind | v0.30+ (around v0.33). Not minikube. |
| Terraform | >= 1.11 required; current stable 1.15.x. S3 use_lockfile. DynamoDB locking is deprecated. |
| Providers | hashicorp/aws >= 5.80; hashicorp/kubernetes 2.38+ / 3.x |
| Docker | Current Engine + Buildx. Multi-stage, no BuildKit-only magic required. |
| Sample app | Python 3.12+ Order API for packaging |
Certificate and scoring honesty
Completing the sprint can issue a BayLearn Certificate of Completion. That is proof you finished this course. It is not CKA, CKAD, CKS, Terraform Associate, or AWS Certified DevOps.
The mock score is weighted rehearsal. Perfect fives become 100 / Exceptional. It does not predict hiring. Say that when you share a report.
Suggested self-paced path (4–5 hours)
- Assessment (15 min). Write down the two weakest skill bars.
- Modules 1–2 (80 min). Containers then Kubernetes. Do C-01, C-06, C-08, C-09.
- Module 3 (40 min). State, modules,
use_lockfile. Do C-18 and C-22. - Module 4 (35 min). Promotion, Browser→DB path, RED/USE, SLI/SLO/SLA.
- Module 5 (35–50 min). LAB-CD-501 then one TRACE scenario (D-01 or D-09).
- Mock (45–60 min) and Module 7 (10 min).
What not to do
- Do not treat this as an AWS Solutions Architect recap. Stay portable first.
- Do not paste cluster-admin kubeconfigs or Terraform state into chat, git, or the player.
- Do not skip TRACE and jump to
kubectl delete pod --all. - Do not document DynamoDB lock tables as the current recommended pattern.
Instructor: BayAreaLa8s Team. Next: Module 0.
You will
- Answer 25 scenario questions
- Show weak categories to the instructor before the live session
How the assessment works5 min
How the assessment works
Module 0 — DevOps Readiness Assessment
Duration: 15 minutes
Twenty-five questions (cd-readiness-v1) before any teaching. This is not a grade. You want two skill bars you will work in the next three hours.
Why this module exists
Interviewers do not start with “tell me every kubectl verb.” They start with a failing checkout and watch whether you can tell cgroup OOM from host RAM, ClusterIP from NodePort, and a locked S3 backend from a laptop terraform.tfstate.
This assessment is the same idea, as multiple-choice and short troubleshooting stems. Speak the *why* even when you click a letter.
What is scored
Nine skills, rolled from the question categories:
| Skill bar | You will see this later as |
|---|---|
| Containers | Module 1, C-01–C-05 |
| Kubernetes | Module 2, C-06–C-15 |
| Terraform | Module 3, C-16–C-22 |
| CI/CD | Module 4, C-23–C-27 |
| Cloud Fundamentals | Optional AWS mapping only — portable first |
| Networking | Browser→DB path, DNS, ndots |
| Security | Non-root, Secrets are not magic, OIDC |
| Observability | RED/USE, SLI/SLO/SLA |
| Troubleshooting | TRACE, D-01–D-22 |
Overall percent maps to: 0–40 Foundation, 41–60 Developing, 61–75 Interview Capable, 76–90 Interview Ready, 91–100 Advanced.
The mock later uses a different instrument (1–5 per dimension, weighted). Do not treat Module 0 as a hiring prediction.
How to take it
- 15 minutes, closed notes if you can stand it.
- After submit, write the two lowest bars on paper.
- Do not “restudy the whole catalog.” Open the matching module and one challenge.
COMMON MISTAKE: Retaking until you hit 90, then skipping Modules 1–4. The assessment is a map, not the course.
SENIOR-LEVEL EXPECTATION: After the score, say which production failure each weak bar would cause on the Order API — not “I need to review Kubernetes.”
INTERVIEW TIP: If you miss the cgroup memory question, that is Module 1 and D-04. If you pick DynamoDB as the current lock, that is Module 3 —
use_lockfileon Terraform 1.11+.
Lessons
Next: Module 1, unless your Kubernetes bar is already the problem — then skim Module 1 security and go deep on Module 2.
Readiness Assessment15 min
Readiness Assessment
Readiness — what to do with the score
In one sentence: Treat the nine bars as a 7-day backlog, not as a personality test.
Read the report the way an interviewer would
A high Containers bar and a low Kubernetes bar means you can build an image and still ship a Service that selects nothing. A high Terraform bar and a low Troubleshooting bar means you can recite plan and still destroy in a war room. Pair bars. Do not average them into “I am a 72.”
Map bars to work
| If this bar is lowest | Do this next, in order |
|---|---|
| Containers | containers.md → images.md → C-01, C-02 |
| Kubernetes | k8s-architecture.md → workloads.md → C-08, C-09, C-06 |
| Terraform | terraform-fundamentals.md → modules-state.md → C-18, C-22 |
| CI/CD | cicd.md → C-24, C-27 |
| Networking | cloud-networking.md + Browser→DB diagram |
| Cloud Fundamentals | Same networking lesson; optional AWS mapping table only |
| Security | container-security.md + observe-secure.md + C-12 |
| Observability | observe-secure.md + RED/USE + SLI/SLO/SLA |
| Troubleshooting | TRACE → D-01, D-09, D-11 |
Spoken 60-second template after Module 0
“My readiness is [band] at [percent]. Strongest bars are [x] and [y]. I will work [weak1] by walking [specific failure] on the Order API, and [weak2] by [challenge id]. The score is rehearsal. It does not predict hiring.”
If you cannot fill that template, you used the assessment as a quiz, not as a plan.
What “Interview Ready” on Module 0 does *not* mean
You still have not deployed to kind, locked state, or sat a 45-minute mock. Module 0 Interview Ready means the multiple-choice map is in good shape. Module 6 Interview Ready means weighted 1–5 ratings landed 75–84 after a human (or the player) scored the spoken interview.
COMMON MISTAKE: Screenshotting 91 Advanced and skipping the lab. Later interviews break on TRACE order, not on trivia.
SENIOR-LEVEL EXPECTATION: Convert each weak bar into a production symptom (“Services with empty Endpoints,” “two applies, one state key, no lock”).
Weak vs strong answer
Weak: Screenshot 91 Advanced and skip the lab.
Strong: “Kubernetes is my low bar. I will TRACE empty Endpoints on C-08 before I sit Module 6.”
Whiteboard in 60 seconds
- Nine bars → two items on a work list.
- Deploy, automate, and operate along the journey.
- Say the disclaimer: rehearsal, not a hiring prediction.
Follow-up ladder
- High Docker, low Kubernetes? → you can build an image and still ship an empty Service.
- High Terraform, low TRACE? → you can recite plan and still destroy in a war room.
- Module 0 Interview Ready vs Module 6? → multiple choice vs spoken 1–5.
Interview questions
What do I do with a 58 Developing?
Pair bars. Schedule C-01 and C-08. Do not average into “I am a 58.”
Does this predict a hire?
No. It is a weekend rehearsal map.
INTERVIEW TIP: Bring the two weak bars into the mock as questions you *ask them* — “How do you lock S3 state on 1.11+ here?” — so the room sees you already know your gaps.
Certificate reminder
Finishing later modules can unlock a BayLearn course-completion certificate. It is not an industry certification. Do not put “CKA equivalent” on a résumé because this assessment went well.
Next: Module 1 unless your plan says otherwise.
25 scenario questions. Each card is tagged with the skill it scores. Open a card to read the prompt and the four choices.
- Linux cannot enforce memory limits on containers; the process is lying and the node is actually OOM.
- The container hit its cgroup memory.max (Docker --memory / Kubernetes memory limit). The kernel OOM-kills that cgroup. Host free memory is irrelevant once the container is over its quota.
- Node.js ignores cgroups; raise vm.overcommit_memory to 2 so malloc never fails.
- 256 MiB is below the kernel's minimum for PID 1, so the runtime always OOMs.
Scored take: enroll, open Learn, then this same lesson. One question at a time. After 15 you see your band and eight skill scores.
You will
- Defend a production Dockerfile
- Fix an insecure image without memorizing flags
Containers vs VMs10 min
Containers vs VMs
Containers vs VMs
In one sentence: A container is a process with isolation knobs (namespaces, cgroups, often a union filesystem) sharing the host kernel; a VM is a guest machine with its own kernel on a hypervisor.
The interview distinction
Interviewers are not asking you to hate VMs. They are asking whether you know what is shared. If the kernel is shared, a kernel CVE, a privileged container, or a docker.sock mount is a host problem. If you needed a different kernel, a different sysctl surface, or strong multi-tenant isolation, you wanted a VM (or a separate node pool, or a separate cluster) — not another container on the same kernel.
| Dimension | Container | Virtual machine |
|---|---|---|
| Kernel | Shared with host | Guest kernel |
| Isolation | Namespaces + cgroups (+ seccomp, capabilities) | Hypervisor + guest OS |
| Density | High — process-sized | Lower — machine-sized |
| Start time | Seconds or less | Tens of seconds and up |
| Works well when | Same kernel ABI, app-level packages | Untrusted tenants, other OS, kernel-sensitive workloads |
| Fails as a story when | You say “complete isolation” | You say “too heavy so we never use them” |
Read the diagram, then say: I package the Order API as a container because I want a repeatable filesystem and resource caps, not because I believe it is a tiny VM. I still run those containers on VMs (or a managed node) because the node is the kernel I have to patch.
Namespaces and cgroups — the two halves
Namespaces answer “what can this process see?” PID, mount, network, UTS, IPC, user. The Order API’s 127.0.0.1 is *its* network namespace. That is why binding localhost inside the container does not publish the service to teammates.
cgroups answer “how much can it burn?” Memory max is a kill. CPU max is a throttle. Those are different production symptoms: OOMKilled versus mysterious latency. Host free can look healthy while the container is dead. That is not a contradiction. That is the model.
COMMON MISTAKE: “Containers are isolated like VMs, just faster.” Isolation is a spectrum. Privileged plus hostPath is basically the host.
SENIOR-LEVEL EXPECTATION: Name a case where you would *not* pack two teams on one kernel: hostile multi-tenancy, PCI scope, or a workload that needs a custom kernel module.
What “the container” is not
It is not a full init system unless you put one there. It is not a security boundary you can brag about without capabilities, seccomp, and a non-root user. It is not portable to a different architecture just because the Dockerfile built on your laptop (arm64 vs amd64 is a Module 1 trap).
It is also not Kubernetes. Docker Engine runs a container. Kubernetes schedules Pods (one or more containers) onto nodes. kind gives you a Kubernetes API on Docker; it does not make Docker “production orchestration.”
When a VM is the better isolation boundary
- You sell a multi-tenant platform and a breakout is a company-ending event.
- You must run Windows and Linux, or two kernel versions, on the same metal story.
- Compliance wants a machine identity, not a cgroup.
- The workload is a nested hypervisor or something that assumes it owns the kernel.
For the Order API in this sprint, a container on a kind node is the right lab boundary. In an interview, say what would make you split node groups or clusters — noisy neighbor, kernel, or blast radius — not “we containerized so isolation is solved.”
Linux extras interviewers actually use (not a second course)
You should be able to talk about:
- PID 1 — SIGTERM lands here; zombies get reaped here.
- File descriptors and ulimits — the container can be tighter than the host.
- Capabilities —
USERwithout droppingCAP_SYS_ADMINis theater. - Bind address —
0.0.0.0to receive traffic; restrict with policy, not by hoping localhost is “the machine.”
Spoken 90 seconds (practice)
“A VM virtualizes hardware and runs a guest kernel. A container is a jailed process on the host kernel: namespaces hide the view, cgroups cap the burn. I use containers for the Order API because I want a digest I can promote. I still patch nodes, drop capabilities, and refuse privileged. If a customer needed hard isolation, I would not put them on the same kernel as checkout.”
Check yourself
| If they ask | Do not say | Do say |
|---|---|---|
| Are containers secure? | “Yes, they are sandboxes.” | “They reduce the package surface. Security is USER, caps, seccomp, and not mounting the host.” |
| Why not one VM per replica? | “VMs are obsolete.” | “Density and start time. I still use VMs as nodes.” |
| Can it reach the host network? | “Containers have their own IP so they are isolated.” | “Depends on mode: bridge, host, none. host network is a smell for an API.” |
How this shows up on the Order API
A replica is a process: one digest, one uid, one cgroup. Three replicas are three processes, not three guest operating systems. They share the node kernel, so a kernel panic or a privileged sibling is a shared fate. That is why node pools and cluster splits exist — not because “Kubernetes wanted more YAML.”
When checkout OOMs, you ask: cgroup limit or node MemoryPressure? When checkout cannot bind, you ask: which network namespace? When SIGTERM does nothing, you ask: who is PID 1? Those three questions are this lesson with a pager.
kind does not change the model. A Pod is still one or more of these processes on a node kernel. Orchestration starts in the next module. Isolation starts here.
Weak vs strong answer
Weak: “Containers are lightweight VMs.”
Strong: “A container is a process with namespaces and cgroups on a shared kernel. A VM has a guest kernel. I still run containers on VMs because I still patch the node.”
Weak: “They are isolated, so we are safe.”
Strong: “Isolation is a spectrum. Privileged plus hostPath is the host. A kernel CVE is a shared fate.”
Whiteboard in 60 seconds
- Box the host kernel once. Put two containers on it; put a VM beside it with its own kernel.
- Label namespaces (what it sees) and cgroups (what it can burn).
- Draw the Order API as three processes, not three guest OS copies.
- Write: “kind does not change the kernel model.”
Follow-up ladder
- What is shared? → the kernel.
- Why can host
freelook fine? → the cgroup already killed the process. - When is a VM the better box? → hostile multi-tenancy, other OS, kernel modules.
- What is PID 1’s job? → signals and reaping.
- Why is host networking a smell for an API? → you left the namespace.
Interview questions
Container vs VM — when is each the isolation boundary?
Same kernel vs guest kernel. Density vs breakout risk.
What do namespaces and cgroups each buy you?
View vs burn. OOM vs throttle are different pages.
Is Docker the same as Kubernetes?
Engine runs a container. Kubernetes schedules Pods of those processes.
INTERVIEW TIP: If they pivot to Kubernetes immediately, take one sentence to plant the kernel model. CrashLoop and OOM later will make more sense.
Images, layers, and Dockerfiles12 min
Images, layers, and Dockerfiles
Images, layers, and Dockerfiles
In one sentence: An image is a stack of immutable layers plus config (user, env, entrypoint); a Dockerfile is a recipe whose instruction order is also a cache and leak policy.
Layers are not a trivia card
Each instruction that changes the filesystem typically adds a layer. Later instructions see the result of earlier ones. If you COPY . . before pip install, every source edit busts the dependency layer. If you COPY .env or RUN cat secret, that blob lives in history even if a later layer deletes the file.
Read the diagram, then say: I order the Dockerfile from least-changing to most-changing, and I never put a secret in a layer I cannot un-publish.
| Instruction | What it is for | Interview trap |
|---|---|---|
FROM | Base; pin digest or immutable tag | :latest moves under you |
WORKDIR | Directory for later commands | Forgetting it, then COPY to / |
COPY | Explicit files from context | Context is huge without .dockerignore |
ADD | Extra magic (URL, tar) | Fetching URLs you cannot pin; surprise extraction |
RUN | Build-time commands (layers) | apt-get without cleanup; leaking tokens in RUN |
ENV | Runtime env persisted in config | Baking secrets; confusing with ARG |
ARG | Build-time only — unless you ENV it | --build-arg in CI logs; leftover ENV ${ARG} |
EXPOSE | Documentation of a port | Thinking it opens a firewall |
USER | Default uid/gid | Name without numeric UID; files still owned by root |
ENTRYPOINT | The process | Shell form swallows signals |
CMD | Default args to ENTRYPOINT | People think CMD is “the start command” always |
HEALTHCHECK | Engine-level check | Not a Kubernetes probe; different failure domain |
Prefer COPY over ADD unless you have a pinned, understood reason. Prefer numeric USER. Prefer exec form JSON arrays.
RUN vs CMD vs ENTRYPOINT
This trio trips more people than multi-stage.
- `RUN` happens at build. It installs packages, compiles, copies artifacts between stages. It is not what starts the Order API at 3 a.m.
- `ENTRYPOINT` is the process Kubernetes will run (unless the Pod overrides command). Make it the server, or
tinithen the server. - `CMD` supplies default arguments. If
ENTRYPOINTis the binary,CMDcan be["--port", "8080"]. If you only setCMDand noENTRYPOINT, CMD is the process.
Both set: entrypoint is the binary, cmd is args. Override in Kubernetes with command / args — know which one you are replacing.
Shell form vs exec form: CMD npm start runs under /bin/sh -c. PID 1 is the shell. SIGTERM may not reach Node. CMD ["node", "server.js"] makes node PID 1 if it is the entrypoint. For a shell you cannot avoid, use tini or exec in a small script.
dockerfile
# Interview-correct shape (sketch)
FROM python:3.12-slim@sha256:… AS runtime
WORKDIR /app
COPY --from=build /app/.venv /app/.venv
COPY app ./app
USER 10001
EXPOSE 8080
ENTRYPOINT ["/app/.venv/bin/python", "-m", "uvicorn"]
CMD ["app.main:app", "--host", "0.0.0.0", "--port", "8080"]COMMON MISTAKE:
CMD python app.pyplus a KuberneteslivenessProbethat kills a process that never received SIGTERM. You will see 137s and dropped in-flight work.
SENIOR-LEVEL EXPECTATION: Explain how a Pod
commandoverrides image ENTRYPOINT, and why a platform team pins that in the golden manifest so app teams cannot silently swap PID 1.
Multi-stage builds
Why: compilers, headers, test toolchains, and SSH clients do not belong in the thing that serves checkout. You build in a fat stage and COPY --from=build the artifact into a slim or distroless stage.
What multi-stage does not fix: a 2 GB build context, a secret in the builder stage that you also copied, a final stage that COPY --from=build / the entire builder, or a runtime that still runs as root.
Distroless/scratch: smaller attack surface, harder debug (kubectl exec has no shell). That is an operational trade-off you should name, not a religion.
Cache, context, and Compose
Cache misses: instruction text changed, a copied file changed, or --no-cache / BuildKit mount mistakes. Debug by reading which step invalidated, not by turning cache off forever.
.dockerignore is a security and performance control. If context is the git root, you send .git, tests, local venvs, and sometimes .env. CI gets slow and flaky; leak risk goes up.
Compose is the right tool for a laptop Order API + Postgres. It is not production Kubernetes. Say when you stop: you need a scheduler, rolling updates, and a cluster API — that is kind in this sprint, and a managed cluster in production talk.
Image identity
The image in your daemon and the tag in the registry can diverge. Tags move. Digests do not. Production apply and GitOps should pin @sha256:…. Humans can still say orders:1.14 in chat; the cluster should not float.
Weak vs strong answer
Weak: “I use latest so we always get patches.”
Strong: “I pin a digest. Tags move. Promotion is the same bytes staging already ran.”
Weak: “CMD starts the app; RUN is the same thing at boot.”
Strong: “RUN is build. ENTRYPOINT is PID 1. CMD is default args. Exec form so SIGTERM lands.”
Whiteboard in 60 seconds
- Stack FROM → deps → COPY src → USER → CMD.
- Circle the cache bust: source before lockfile.
- Draw a fat builder and a slim runtime with
COPY --from. - Write
@sha256:…under the registry, not:latest.
Follow-up ladder
- COPY vs ADD? → COPY unless you have a pinned reason.
- ARG vs ENV? → build-time vs persisted; do not ENV a secret ARG.
- Why
.dockerignore? → context is a leak and a slow CI. - Does EXPOSE publish? → no.
- HEALTHCHECK vs probes? → Engine vs kubelet.
Interview questions
Why does instruction order matter?
Cache and leak policy. A secret in an early layer is still in history.
What does multi-stage not fix?
A 2 GB context, COPY --from=build /, or a root runtime.
How do you identify the production image?
Digest. Humans can say 1.14 in chat; the cluster pins @sha256.
INTERVIEW TIP: If they ask HEALTHCHECK vs probes: Engine HEALTHCHECK is for
docker run/ Compose. Kubernetes will not honor it as readiness. You still write probes on the Pod.
Build optimization and container security13 min
Build optimization and container security
Build optimization and container security
In one sentence: A fast, small image that still runs as root with a socket mount is not a win. Speed the cache and shrink the attack surface in the same pass.
Security is a production property
Interviewers do not want a CIS dump. They want you to name what a bad image does at 2 a.m.: a leaked npm token in layer history, a container that escaped via docker.sock, a UID 0 process that wrote into a hostPath, or a scanner that you ignored because “it is only critical in the builder stage” when that stage *is* the final image.
Secure Dockerfile checklist (teach, then download)
| Control | Why it fails in production | |
|---|---|---|
| Pin base by digest | :latest on Monday is not Friday’s build | |
| Multi-stage; no compiler in runtime | Extra packages are extra CVEs and extra shell | |
.dockerignore | Secrets and .git enter context | |
No secrets in ENV / COPY / `RUN curl \ | bash` | History is forever; rotate is a fire drill |
| BuildKit secret mounts for tokens | ARG still shows up in docker history if misused | |
Numeric non-root USER | Admission runAsNonRoot; volume permissions | |
| Drop capabilities; no privileged | Privileged is host root with extra steps | |
| No SSH daemon “for debug” | You just shipped a remote-login API | |
| HEALTHCHECK or document probes | Silent death vs traffic still landing | |
| SBOM + scan in CI | Scanner is a signal, not a proof of safety |
COMMON MISTAKE:
USER appbut/appisroot:rootmode 700. The process dies on EACCES and someone “fixes” it withchmod 777.
SENIOR-LEVEL EXPECTATION: Separate build identity from runtime identity. CI uses OIDC to push. The running uid cannot pull or overwrite the production tag.
Networking and volumes (container scope)
Bridge / default: container has its own namespace; you publish a port to the host if a human must hit it. Host: the process shares the host stack — useful for some agents, a smell for the Order API. None: no NIC; you must be doing something very specific.
EXPOSE does not publish. Publish is -p or a Kubernetes Service.
Writable layer vs volume: the writable layer dies with the container and is a poor database. Named volumes and bind mounts have permission stories: the uid in the container must match what the volume already has. EACCES after you “fixed the mount” is usually uid/gid, not “Docker is broken.”
Do not store checkout data only in the overlay. Do not bind-mount / or the Docker socket to “make CI easier.”
Privileged, sockets, and DinD
privileged: true widens device access and almost all capabilities. It is rarely the fix for “my container cannot listen on 80” (CAP_NET_BIND_SERVICE or listen on 8080 instead).
Mounting /var/run/docker.sock is host root. A job that builds images should use a sandboxed builder (BuildKit remote, kaniko-style, or a dedicated builder) — not a privileged DinD sidecar as the golden path. Platform interviews stop people who productize the socket.
Scanning, SBOMs, signing
A scanner tells you known CVEs in the packages it can see. It does not tell you the app is safe, the Dockerfile is honest, or the running digest matches the signed attestation. Signing matters only if admission or the deploy robot verifies. Cosign in CI with no verify is a sticker.
Triage CVEs by reachability and whether the bit is in the *final* image. Do not block the company on a compiler CVE that never shipped — and do not ignore a crypto CVE in the runtime stage because the ticket is noisy.
Optimization that is actually senior
- Copy lockfiles /
requirements.txtbefore source. - Use BuildKit cache mounts for package managers in CI — without copying the whole monorepo first.
- Multi-arch: build
linux/amd64on purpose when nodes are amd64. Laptop arm64 success is not production. - Do not squash “for security.” Squash can destroy cache and does not remove secrets already published.
- Do not mutate a running container to patch an incident. Bake a digest and roll. Mutation is the snowflake you will page about next week.
Spoken 90 seconds
“I pin a digest, build in a fat stage, copy a venv or binary into slim, drop to UID 10001, and keep secrets out of layers with BuildKit mounts. I publish 8080, not 22. I scan and sign in CI, and I verify at deploy. Privileged and docker.sock are not platform features.”
Challenges that lock this in
C-01 insecure Dockerfile, C-02 size, C-03 cache, C-04 startup bind, C-05 permissions. Do at least C-01 and C-03 before Module 2.
Review a Dockerfile out loud (90 seconds)
- What is PID 1, and will it see SIGTERM?
- Which layer last changed, and did that bust the dep cache?
- Is there a secret in history even if the file is gone?
- Who is the user, numerically, and can it read
/app? - What would a scanner miss that admission would catch (root, sock, privileged)?
If you can grade a stranger’s gist on those five, you are ready for C-01.
Weak vs strong answer
Weak: “We scan, so the image is safe.”
Strong: “Scan is a signal. I pin, drop to 10001, keep secrets out of layers, and verify the digest at deploy.”
Weak: “Privileged fixed the bind on 80.”
Strong: “Listen on 8080 or add CAP_NET_BIND_SERVICE. Privileged is host root with extra steps.”
Whiteboard in 60 seconds
- Pin → multi-stage → USER 10001 → refuse sock / privileged /
.env. - Show BuildKit secret mount vs
ARGin history. - Write: “CI identity ≠ runtime identity.”
Follow-up ladder
- Why numeric USER? → admission
runAsNonRoot; name-only can still be 0. - Why not docker.sock? → host root.
- What does a scanner miss? → a secret you already published; a root process.
- Squash for security? → no. Cache dies; history may already be public.
- Arm64 laptop vs amd64 node? → build the platform the node runs.
Interview questions
What belongs in the final image?
The binary or venv, a slim base, a numeric user. Not gcc, .git, or .env.
How do you handle a CVE?
Reachability in the *final* image. Do not halt on a builder-only compiler you did not ship.
INTERVIEW TIP: If they say “we run as root because the app writes to
/tmp,” the answer is a writable emptyDir or a directory youchownin the Dockerfile — not root.
Next: Module 2 — Kubernetes.
You will
- Explain readiness vs liveness
- Trace a request from Ingress to Pod
Cluster architecture and core objects15 min
Cluster architecture and core objects
Cluster architecture and core objects
In one sentence: Kubernetes is a control loop: you write desired state, controllers reconcile it onto nodes. You do not need to memorize every internal to pass a DevOps interview.
Useful control plane — not a trivia recitation
Interviewers want to know who to look at when the API is slow, when a Pod stays Pending, or when a node dies. They do not want a list of every etcd flag.
| Piece | Job in one sentence | When it shows up in an incident |
|---|---|---|
| API server | Authenticated front door to cluster state | Auth errors, admission denials, “cannot list pods” |
| etcd | Desired and observed state store | API latency, lost writes if you treat it casually |
| Scheduler | Binds Pods to nodes using requests and constraints | Pending, unschedulable, affinity mistakes |
| Controller manager | ReplicaSets, Deployments, Jobs, … chase spec | Replica count wrong, Job not completing |
| kubelet | Node agent: runs Pods, reports status, runs probes | NotReady, probe failures, image pull |
| kube-proxy / data path | Service ClusterIP → Endpoints / EndpointSlices | Empty Endpoints, conntrack, unexpected policy |
| CNI | Pod IP, often overlay | MTU black holes, “node works, pod cannot” |
| CoreDNS | Cluster DNS | Search/ndots, NXDOMAIN, NetworkPolicy forgot 53 |
Do not memorize every controller. Do say: I change a Deployment; a ReplicaSet appears; Pods appear; kubelet pulls and starts; probes update Ready; the Service’s EndpointSlice gains IPs.
kind in this sprint runs that API on Docker. It is a real Kubernetes API with one or more Docker-backed nodes. It is not minikube. It is not EKS. Portable workload YAML should work here; cloud annotations belong in an overlay you can leave off the lab.
COMMON MISTAKE: Drawing fifteen boxes and then failing to say where
kubectl applylands (API server) or where a probe runs (kubelet).
SENIOR-LEVEL EXPECTATION: Admission webhooks sit in front of persist. Fail-closed vs fail-open is a platform incident, not a trivia item.
Pods are the atom
A Pod is the schedulable unit: one or more containers, shared network namespace, shared volumes you declared. Kubernetes does not place “a container” on a node. It places a Pod.
That is why sidecars share localhost with the app, why a second container can share a volume, and why you almost never run a lonely container as the production abstraction.
Pods are mortal. You do not SSH in and upgrade them. You replace them via a controller.
Desired versus observed
You write replicas: 3 and a container port. The cluster reports Ready 2/3 and Events. Debugging is reconciling the gap, not deleting everything so the gap disappears.
kubectl get / describe / Events / logs are how you read observed state. apply / GitOps is how you change desired state. kubectl edit in production without a revert path is how GitOps clusters drift (Q-167).
Core objects you must speak
| Object | You should be able to say |
|---|---|
| Namespace | Soft tenancy and RBAC boundary — not a hard security wall |
| Pod | Atom; IP; probes; resources |
| ReplicaSet | Owns Pods matching a selector; usually created by a Deployment |
| Deployment | Rolling updates, revision history, the usual API app |
| Service | Stable virtual IP + selector → Endpoints |
| Ingress / Gateway | L7 (or specialized) entry; needs a controller |
| ConfigMap | Non-secret config; still can break prod if you mount it wrong |
| Secret | API object, base64 in the default representation, not magically secure |
| PVC / PV | Storage claim vs provisioned volume |
| Job / CronJob | Run-to-completion; concurrency policy matters |
| DaemonSet | One per node (or per selected node) — agents, not checkout replicas |
| ServiceAccount + RBAC | Who the Pod is to the API |
StatefulSet, HPA, PDB, NetworkPolicy get depth in the next two lessons. Helm/Kustomize are optional overlays, not a four-hour requirement.
Secrets are not a vault
A Kubernetes Secret is a namespaced API object. By default, values are base64 in YAML — that is encoding, not encryption. etcd may be encrypted at rest. That still means anyone with get secrets in the namespace can read them. They appear as env or files in the Pod. They show up in backups.
Say this to close: encrypt etcd, tight RBAC, no Secrets in git, and a real secret manager or workload identity for production credentials. Sealed/SOPS/external operators are tactics. The object is not magic.
kind versus “a real cluster”
kind is a Kubernetes API. Controllers reconcile. kubelet on the kind node runs your Pod. What you may not have: a cloud LoadBalancer controller, an Ingress controller until you install one, IAM roles for service accounts, multi-AZ nodes. That absence is a teaching feature. If the YAML needs an annotation to schedule, it was not portable.
Do not spend interview minutes comparing kind to minikube. This sprint does not use minikube.
If they ask “is kind production?” the answer is no — it is the API you can operate without a bill. Production is the same objects plus node pools, an edge, and identity. YAML you cannot run on kind without a cloud annotation was never portable.
Weak vs strong answer
Weak: Recites fifteen control-plane boxes, then cannot say where kubectl apply lands.
Strong: “Apply hits the API server. Controllers reconcile. kubelet runs probes. I debug the gap between spec and status.”
Weak: “Secrets are encrypted, so they are safe.”
Strong: “Default YAML is base64. Anyone with get secrets can read them. I want etcd encryption, tight RBAC, and a real manager.”
Whiteboard in 60 seconds
- API server + etcd + scheduler + controllers on one side; kubelet on the node.
- Deployment → ReplicaSet → Pod; Service beside it.
- Arrow:
applyinto the API, not into the scheduler.
Follow-up ladder
- Where does apply persist? → API server / etcd.
- Why is a Pod Pending? → scheduler could not bind (requests, taints, PVC).
- Why is a Pod CrashLoop? → kubelet started it; the process died.
- Is kind production? → no. Same objects; no cloud controller until you add one.
- What is a Secret really? → a namespaced object, not a vault.
Interview questions
What happens after I apply a Deployment?
ReplicaSet appears, Pods bind, kubelet pulls, probes flip Ready, EndpointSlice gains IPs.
kind vs EKS?
kind is the API you can operate without a bill. Portable YAML should run here. Cloud annotations belong in an overlay.
INTERVIEW TIP: If they ask you to list every kube-system DaemonSet, redirect: “I can talk about CoreDNS and the node agent. I do not memorize the addon inventory of every cluster.”
Deployments, Services, probes, resources15 min
Deployments, Services, probes, resources
Deployments, Services, probes, resources
In one sentence: A Deployment keeps a replica set of Pods; a Service load-balances to Ready Pods; probes and requests decide who gets traffic and who fits on a node.
Deployment and ReplicaSet
A Deployment owns ReplicaSets. Each roll creates (or reuses) an RS with a new pod-template hash. You almost never create an RS by hand. You almost never kubectl delete pod as the *design* — the RS will replace it. Deleting a pod is a debug move. It is not a deploy strategy.
Rolling update: maxUnavailable / maxSurge, readiness, and a progress deadline. “Not all at once” is not enough. A safe roll means new pods become Ready before you take too many old ones, PDBs allow drain, and you can undo or halt.
Services — pick the right type on purpose
| Type | What it does | Production default? |
|---|---|---|
| ClusterIP | Virtual IP inside the cluster | Yes for east-west. This is the default. |
| NodePort | Opens a high port on every node | Tutorial / break-glass / some bare-metal. Not the default internet path. |
| LoadBalancer | Asks the cloud (or a dummy in kind) for an external LB | Internet or private LB when a controller can provision one |
Why NodePort is not “how we expose prod”: you leak a port on every node, you skip L7 routing and certs at the edge, and you teach the team the wrong default. kind may show NodePort for laptop demos. Say that out loud so they know you are not confusing the lab with the internet.
Selector and ports: if labels do not match the Pod template, Endpoints stay empty. If targetPort ≠ containerPort, you get refused or silence. kubectl get endpoints / EndpointSlice is the first proof, not curl from your laptop.
Headless Services (clusterIP: None) return Pod IPs — useful for StatefulSets, not for a typical Order API.
Ingress and Gateway
An Ingress (or Gateway API) is not a replacement for ClusterIP. It is an L7 (or specialized) rule set in front of Services. Something must implement it (ingress-nginx, Gateway controller, cloud controller).
Path: Browser → DNS → load balancer → Ingress/Gateway controller → Service ClusterIP → kube-proxy/datapath → Pod IP:containerPort. Module 4 expands this to the database. Here, remember: 502 often means the controller could not get a Ready backend, not “Kubernetes is down.”
kind: install a controller if you want real Ingress. Without one, Ingress objects sit idle. That is a common lab false-negative.
ConfigMaps and Secrets
ConfigMaps are for non-secret config. Mount as files if you need atomic-ish updates and signals; env vars are simple and require a roll to refresh.
Secrets: same mount/env mechanics. Still not a vault. Do not check them into git. Do not log them. Prefer workload identity over long-lived keys in Secret objects (Module 4).
A missing key is D-21. A Secret that exists but is the wrong key name is an env-from miss — the Pod may CrashLoop on start.
Probes — three jobs, three disasters if swapped
| Probe | Question it answers | If you get it wrong |
|---|---|---|
| startupProbe | Has the process finished booting? | JVM/Python cold start killed by liveness |
| readinessProbe | Should this Pod receive Service traffic? | Traffic to a warming or dependency-broken replica |
| livenessProbe | Is this process so stuck it should be restarted? | Restart storm; self-DoS if it hits Postgres |
Readiness may check a cheap dependency (or a local “I can serve 503”). Liveness should be local and cheap — “the event loop answers,” not “the database in another AZ answers.” If liveness depends on Postgres and Postgres blips, kubelet restarts every replica and you turn a blip into an outage.
Timeouts and failureThreshold are part of the design. A 1-second timeout on a 3-second GC is a flap.
Docker HEALTHCHECK ≠ these probes. Compose may use HEALTHCHECK; the cluster uses the Pod spec.
Requests, limits, QoS
| Field | Scheduler | Runtime |
|---|---|---|
| CPU request | Fits the node | Baseline for HPA / overcommit story |
| CPU limit | — | Throttle (latency), does not OOM |
| Memory request | Fits the node | Best-effort vs guaranteed |
| Memory limit | — | cgroup OOM kill (137 / OOMKilled) |
Set neither: scheduler treats you as BestEffort; you are first to evict, and you can starve neighbors. Set only limits: request defaults to limit in some interpretations — know what *your* cluster does, and still set both explicitly in interviews.
QoS: Guaranteed (req = lim for all), Burstable, BestEffort. Eviction and MemoryPressure care.
COMMON MISTAKE: Raising memory limit because you saw CPU throttle — or raising CPU because you saw OOMKilled.
SENIOR-LEVEL EXPECTATION: Show a probe path that cannot take the whole fleet down, and requests that match the working set you measured, not a guess from a tutorial.
kubectl as support, not the answer
Know the commands. Do not perform them:
text
kubectl get deploy,po,svc,ep -n orders
kubectl describe pod <name> # Events, probe, image, node
kubectl logs <name> --previous # last crash
kubectl get replicaset,endpoints
kubectl rollout status deploy/orders
kubectl top pod # if metrics-server existsThe answer is the model. The commands are how you read it.
Weak vs strong answer
Weak: “We expose prod with NodePort because that is what the tutorial used.”
Strong: “ClusterIP east-west. Ingress or a gateway north-south. NodePort is a lab shortcut.”
Weak: “Liveness hits Postgres so we know the app works.”
Strong: “Liveness is local and cheap. A DB blip must not restart the fleet. Readiness may drain.”
Whiteboard in 60 seconds
- Deployment → ReplicaSet → Ready pods → Service.
- Ingress in front of ClusterIP, not instead of it.
- Three probes labeled: boot / traffic / restart.
- Requests for packing; memory limit for OOMKill.
Follow-up ladder
- Why empty Endpoints? → labels or not Ready.
- What does a rolling update create? → a new ReplicaSet.
- HEALTHCHECK vs probes? → Engine vs kubelet.
- CPU limit vs memory limit? → throttle vs kill.
- Why
maxUnavailable: 0can still fail? → the cluster has no room to surge.
Interview questions
Readiness vs liveness?
Drain vs restart. Swap them and you get a restart storm or traffic to a warming pod.
Default Service type in production?
ClusterIP. Prove it with kubectl get endpoints.
Challenges: C-06 CrashLoop, C-08 selector, C-09 probe, C-10 resources, C-11 ConfigMap, C-12 Secret, C-13 rollout, C-14 Ingress.
Scheduling, scaling, security, troubleshooting15 min
Scheduling, scaling, security, troubleshooting
Scheduling, scaling, security, troubleshooting
In one sentence: The scheduler places work that fits; HPA scales on a signal you chose; security is RBAC, admission, and NetworkPolicy; troubleshooting is TRACE plus Events — not delete --all.
Scheduling
The scheduler binds a Pod to a node when requests fit leftover allocatable, and when taints/tolerations, affinity, topology, and PVC constraints allow it.
Pending is not CrashLoop. Pending is: unschedulable, PVC unbound, nodeSelector that matches nothing, or insufficient CPU/memory requests. describe the Pod and read Events. Image pull happens *after* schedule — ImagePullBackOff is a different state (D-03).
taints/tolerations keep checkout off a tainted system pool unless you meant it. affinity is a preference or a requirement — say which. topologySpread is how you avoid one AZ holding all replicas.
HPA
Horizontal Pod Autoscaler changes replica count from a metric (CPU, memory, or custom). CPU-only HPA flaps on JVM warmup and on throttle from a tight limit. You need:
- A stable metric that tracks user pain or true load
- Stabilization windows
- Min/max that a PDB and the cluster can actually absorb
- Requests that make “80% CPU” mean something
HPA does not add nodes. Cluster autoscaler / node pools do. Cloud interviews that mix “VM ASG” and “HPA” want both named (Q-190).
StatefulSet — do not put every database in Kubernetes
StatefulSet gives stable identity (ordinal names, stable storage per identity, ordered start/stop if you asked). Use it when the app protocol needs that identity (some brokers, some clustered data stores you truly operate).
Do not put every Postgres in-cluster because “we are a Kubernetes shop.” You then own backups, failover, storage classes, upgrades, and restore drills. A managed database is often the senior answer. If you do run data in-cluster, say the storage class, backup, and what happens when a node dies.
DaemonSet is the opposite shape: one per node (agents). Using it for a horizontally scalable API is a design error.
Jobs/CronJobs: restartPolicy, backoff, and concurrencyPolicy so a 5-minute job does not overlap itself into a thundering herd.
Networking and security
Services + DNS: http://orders uses search/ndots. Cross-namespace, prefer FQDNs (orders.payments.svc.cluster.local). NetworkPolicy default-deny without allowing DNS and the probe path will look like “the mesh is down.”
RBAC: deploy robot gets apply in one namespace. Humans get debug. Cluster-admin in CI is an incident (Module 4).
Pod Security Admission / policy engines: restricted mode blocks root, hostPath, privileged. Roll it out namespace by namespace. Fail-closed admission is a platform outage if the webhook dies — decide that on purpose (mock M-03).
hostPath and privileged are cluster-level risks, not app conveniences.
PDB: protects voluntary disruption (drain, upgrade). It does not stop a node dying or an OOM of every replica. minAvailable == replicas can deadlock a drain.
Troubleshooting framework
Operating means TRACE (DEPLOY-IT):
- Triage impact — which users, which SLI, 5% or 50%
- Review recent changes — image, Terraform, flag, node recycle
- Analyze signals — Events, logs, traces,
describe - Check dependencies & capacity — DNS, disk, endpoints, downstream Ready-but-wrong
- Execute mitigation, then root cause — halt roll, rollback, cordon; then fix the probe or the selector
| Symptom | First proofs | Typical miss |
|---|---|---|
| CrashLoopBackOff | logs --previous, describe, exit code | Delete pod so logs vanish |
| Pending | Events, requests vs allocatable, PVC | Treat as image pull |
| ImagePullBackOff | Secret, digest, node arch | Works on one node (cached) |
| Empty Endpoints | Labels, readiness, targetPort | “Service is broken” |
| 502 at Ingress | Ready backends, controller logs | Restart CoreDNS first |
| OOMKilled | Last state 137, limit vs working set | Add nodes, ignore cgroup |
| CPU latency | throttle, limit | Raise memory |
Download kubernetes-troubleshooting.md after you can fill that table without looking.
kubectl cheat sheet (support)
text
# placement and health
kubectl describe pod POD | less
kubectl get events --sort-by=.lastTimestamp
kubectl get nodes -o wide
kubectl auth can-i list secrets -n orders
# traffic
kubectl get ep,endpointslice -n orders
kubectl get ingress -A
kubectl exec -it POD -- wget -qO- http://orders:8080/health
# roll
kubectl rollout history deploy/orders
kubectl rollout undo deploy/orders --to-revision=Nexec is after TRACE, not instead of it. In GitOps clusters, rollout undo is a mitigation that you must follow with a git revert or you will fight the sync.
COMMON MISTAKE:
kubectl delete nsor restarting kind because one Service selector was wrong.
SENIOR-LEVEL EXPECTATION: Narrate TRACE on D-01 or D-09 in 90 seconds without listing twenty commands.
INTERVIEW TIP: kind-only lab: “I proved the YAML here. On EKS I would add the cloud controller and IRSA; the probes and selectors stay.”
Weak vs strong answer
Weak: “Pending means the image is bad.”
Strong: “Pending is unschedulable. ImagePullBackOff is after bind. I read Events before I pull.”
Weak: “Put every database in a StatefulSet — we are a Kubernetes shop.”
Strong: “StatefulSet is identity plus disks. A managed database is often the senior answer. If I run data in-cluster I own backup and restore.”
Whiteboard in 60 seconds
- Requests → node allocatable → bind or Pending.
- HPA → Deployment replicas. Cluster autoscaler → nodes.
- TRACE letters across the top of the incident.
Follow-up ladder
- HPA stuck at 1? → no metrics server, or no CPU requests.
- PDB deadlock? →
minAvailable == replicasduring drain. - NetworkPolicy looks like an outage? → you forgot DNS or probes.
kubectl editin GitOps? → freeze sync, then PR, or the reconciler fights you.
Interview questions
HPA vs cluster autoscaler?
Pods vs nodes. Mixing “ASG” and “HPA” without naming both fails cloud interviews.
Walk CrashLoop in TRACE.
Impact → last change → logs --previous → mitigate (halt roll) → cause (bad probe, bad image, OOM).
Challenges C-07, C-15. Scenarios D-01–D-10, D-20–D-22.
Next: Module 3 — Terraform.
You will
- Explain why production state is not committed to Git
- Recover from a lock or unexpected replacement safely
Providers, plan/apply, and state14 min
Providers, plan/apply, and state
Providers, plan/apply, and state
In one sentence: Terraform is a graph of desired resources; plan diffs that graph against state (refreshed from the world); apply mutates the world and rewrites state.
The workflow you should say in order
| Command | What it is really doing |
|---|---|
init | Download providers/modules; configure the backend |
validate | Syntax and type-ish checks — not a plan |
fmt | Style; CI should check it |
plan | Refresh (unless you skipped it), walk the graph, print the diff |
apply | Take the lock, apply the graph, write state |
destroy | Inverse apply — rarely the incident tool |
You do not “run Terraform.” You propose a plan and apply a known plan. In CI: save the plan file, require review, apply that file. Laptop apply on production is a control-plane failure (Module 6 platform mode).
Providers talk to APIs (hashicorp/aws >= 5.80, hashicorp/kubernetes 2.38+/3.x in this sprint’s policy). Pin provider versions. A surprise provider upgrade is a surprise replacement.
What state actually is
State is Terraform’s memory: address aws_s3_bucket.artifacts → real bucket name, plus attributes and dependencies it last saw. Without state, Terraform cannot know what it already created. It will want to create duplicates or will refuse.
State often contains secrets (database passwords, private keys). It is not a document for git. It is not a whiteboard. Local terraform.tfstate on a laptop is how two engineers create two buckets and one outage.
Refresh updates state from the API so plan sees drift. Skipping refresh to “go faster” hides someone else’s console click.
COMMON MISTAKE: “State is just a cache; I can delete it if apply looks weird.” Deleting state orphans real infrastructure. The next apply may create a second of everything — or fail halfway and make it worse.
SENIOR-LEVEL EXPECTATION: Explain that two root modules must not manage the same object. Split-brain state is worse than no lock.
Variables, locals, outputs
Variables are the module’s input contract. Type them. Do not use string for a map you will for_each. Do not put secrets in TF_VAR_ files that get logged; use a secret store or a marked sensitive variable.
Locals are computed names and DRY expressions inside the module. They are not a second variable API.
Outputs are what other modules or humans consume. Mark sensitive outputs. Do not output the database password into plaintext CI logs.
terraform.tfvars is for non-secret environment values. The same module with different tfvars is how you get staging vs prod — plus separate state keys.
depends_on and lifecycle
Terraform’s graph usually sees references (bucket.id in another resource). `depends_on` is for *hidden* edges: an IAM policy that must exist before a service can use a role, when there is no attribute reference. Sprinkling depends_on everywhere makes plans slower and hides real coupling.
`lifecycle`
| Block | Interview use |
|---|---|
create_before_destroy | Avoid downtime on replacements that can dual-exist |
prevent_destroy | Guardrails on state buckets and databases — not a substitute for RBAC |
ignore_changes | Narrow escape for an attribute another controller owns — easy to lie to yourself |
replace_triggered_by | Explicit replace when a side file changes |
count vs for_each: count indexes by number; inserting at zero replaces everything. for_each on a map of names is the senior default for sets of similar objects (C-19).
Security of the workflow
- No access keys in the repo. Plan/apply uses OIDC or a tightly scoped role.
- State encrypted at rest; bucket versioning on; public access blocked.
terraform fmt -checkandvalidatein CI; policy-as-code on the plan if you have it.- The Kubernetes provider applying raw YAML from CI is a trust-boundary question — often GitOps is cleaner for workloads, Terraform for the cluster’s surrounding cloud objects.
This sprint’s lab: terraform validate / plan locally. You do not need cloud credentials to learn the workflow. When you *talk* cloud, keep it portable: object store backend, lock, IAM-like role.
What you write from memory in M-01
A required_version >= 1.11, an S3 backend with encrypt and use_lockfile, and a hashicorp/aws pin >= 5.80. You do not need to invent a VPC. You need to prove you will not apply the same key from two laptops.
The next lesson writes that backend block in full and talks modules.
If you only remember one sentence from this file: state plus a lock is what you are protecting; HCL resources are how you describe the world to that product.
Weak vs strong answer
Weak: “State is a cache; I can delete it if plan looks weird.”
Strong: “State maps addresses to real objects and often holds secrets. Deleting it orphans infra. The next apply may duplicate the world.”
Weak: “I just apply until it goes green.”
Strong: “I review a saved plan like a pull request. Targeted apply is an exception.”
Whiteboard in 60 seconds
- init → plan → apply → (rarely) destroy.
- Code / state / real world as three boxes.
- Write
use_lockfile = trueon the S3 backend. Cross out DynamoDB for new stacks.
Follow-up ladder
- What does refresh do? → read the world into memory before the diff.
countvsfor_each? → index shift vs named keys.- Why not commit
*.tfstate? → secrets + split-brain. - Two root modules, one bucket? → freeze, pick a winner.
Interview questions
What is Terraform state?
The product’s memory: address → real ID. Not a cache. Not for git.
DynamoDB lock table?
Deprecated as the current pattern. Terraform >= 1.11: S3 use_lockfile.
INTERVIEW TIP: If they still want DynamoDB locking, answer: “That pattern is deprecated. On 1.11+ I set
use_lockfileon the S3 backend. I would migrate old stacks, not open a new lock table.”
Modules, remote state, and locking13 min
Modules, remote state, and locking
Modules, remote state, and locking
In one sentence: Modules are versioned contracts; each environment has its own state key; locking is S3 use_lockfile on Terraform 1.11+, not a new DynamoDB table.
Remote backend — write this from memory
hcl
terraform {
required_version = ">= 1.11.0"
backend "s3" {
bucket = "acme-tfstate-prod"
key = "orders/prod/terraform.tfstate"
region = "us-west-2"
encrypt = true
use_lockfile = true
}
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.80.0"
}
}
}That is the current locking story. Native S3 lock files replace the DynamoDB lock table pattern. You may still *see* DynamoDB in old repos. Migration is a project. New stacks should not add DynamoDB “because a 2019 blog said so.”
Enable versioning and block public access on the bucket. Treat the bucket as production infrastructure of its own (often a bootstrap stack with extra care).
If a lock is stuck: prove no apply is running, then follow current unlock procedure for lockfiles — do not destroy to “clear the lock.” D-11 exists for this.
COMMON MISTAKE: One state file for “the whole company.” Blast radius is every apply. Prefer per-system or per-team keys.
SENIOR-LEVEL EXPECTATION: Per-environment keys (
orders/dev,orders/prod), CI-only apply, and a written migrate-to-use_lockfileplan for legacy DynamoDB stacks.
Modules as a product
A module is an interface: inputs, outputs, a version. App teams should not fork 400 lines of bucket policy. They should consume module "artifacts" { source = "…"; version = "2.3.0" }.
| Design choice | Why it matters |
|---|---|
| Small, purposeful modules | A “do everything cloud” module cannot version |
| Semantic versions | v2 can be breaking; do not surprise ten teams on Friday |
| Typed variables | C-17 — any hides mistakes until apply |
| Defaults that are safe | Public ACL should not be a silent default |
| Examples + tests | kind/terraform tests for the contract, not only happy path |
source from a registry or a tagged git ref, not main. Pin. The same discipline as image digests.
Module composition: root module per env/app wires child modules. Child modules should not assume they own the backend. The root does.
Repo structure trade-offs
There is no single holy layout. You must name the trade-off.
| Layout | Wins | Loses |
|---|---|---|
Monorepo, modules/ + envs/prod | One PR, shared modules | Blast radius; CI must be smart |
| Repo per module | Independent versioning | Version soup; slower change |
| Terragrust-style wrappers | DRY env wiring | Another DSL to interview on |
| One root, workspaces for env | Looks simple | Easy to apply the wrong workspace to prod |
Workspaces are a sharp tool. Many teams prefer separate state keys and directories over terraform workspace select prod on a laptop.
Do not mix the Order API’s Kubernetes manifests and the VPC in one apply unless you like 20-minute plans and surprise node replacements when you change a probe.
Variables versus locals versus data
- variable — caller sets it (or a default).
- local — you compute it; not part of the external API.
- data — read existing objects. Data sources in apply-time that depend on just-created resources can create chicken-and-egg plans. Know when to split stacks.
terraform_remote_state data source couples stacks. It is convenient and creates hidden apply order. Prefer well-defined outputs consumed deliberately, or a second plan in a pipeline with an explicit dependency.
What you do *not* put in the first module
In engineer mocks (M-01): do not design a multi-region mesh on day one. Bucket, encryption, lock, and a role the pipeline can assume. Platform mocks (M-03): the module *is* the product — version, policy, per-team state.
INTERVIEW TIP: If they ask “Terraform or Crossplane?” stay on the control plane properties that do not change: desired state, lock, identity, policy. Then pick a tool.
Weak vs strong answer
Weak: “One state file for the company is simpler.”
Strong: “Per-system, per-environment keys. One apply must not be able to touch the whole estate.”
Weak: “Workspaces keep prod and staging in one folder. I just select.”
Strong: “Easy to apply the wrong workspace. I prefer directories and separate keys.”
Whiteboard in 60 seconds
- Write the S3 backend block with
encryptanduse_lockfile. - Root module wires
module.networkandmodule.compute. - Two keys:
orders/devandorders/prod.
Follow-up ladder
- Who owns the backend? → the root module, not the child.
- Pin module source? → version or git tag, not
main. - Stuck lock? → prove no apply is running, then unlock. Never destroy to clear it.
terraform_remote_staterisk? → hidden apply order.
Interview questions
Write a production backend from memory.
S3, encrypt, versioned bucket, use_lockfile = true, Terraform >= 1.11.
What is a module?
A versioned contract: inputs, outputs, examples. Not a folder of copy-paste.
Challenges C-16, C-17, C-20, C-22.
Drift, import, security, troubleshooting13 min
Drift, import, security, troubleshooting
Drift, import, security, troubleshooting
In one sentence: The console, a second state key, and a bad count index are how reality diverges from Terraform. You import or move addresses. You do not destroy to feel better.
Drift
Drift is: the world changed and state did not (or state changed and the world did not). Someone clicked in the console. A controller mutated a tag. An apply failed after creating but before writing state.
plan after refresh shows drift. Your job is to decide:
- Adopt it — update code to match, then apply a no-op or small align.
- Revert it — apply to push code back onto the object (know the blast radius).
- Ignore a narrow attribute —
ignore_changeswhen another system owns it, and say so in a comment.
GitOps plus kubectl edit is the Kubernetes cousin. Terraform plus console click is this lesson.
COMMON MISTAKE:
terraform apply -auto-approvein a panic to “fix drift” without reading the destroy line in the plan.
SENIOR-LEVEL EXPECTATION: Two state files managing one security group — freeze applies, pick a winner,
state rmfrom the loser, import if needed. Do not apply both.
Import and state moves
Import attaches an existing object to an address. After import, the next plan should be small. If it wants to replace everything, your config does not match the object.
moved blocks (and state mv) rename addresses without recreate — essential when you extract a module or switch count to for_each.
Never “fix” a surprise replacement by destroying from the console while Terraform still thinks it owns the name. You will get a create that conflicts or a state that points at a ghost.
Unexpected replacement
Read the plan’s replace reason. Common causes:
nameor an immutable identifier changedcountindex shift- Provider upgrade behavior
forcenew on an AMI or engine version- A tag set you marked as identity
C-19 and D-12 live here. create_before_destroy only helps if two objects can exist at once (not always true for a unique DNS name).
Apply failed halfway (D-11, D-26 / Q-226)
TRACE it: impact (what exists in the cloud vs what state says), recent change (this apply), signals (error, partial resources), capacity/locks, then mitigate.
Usually: plan again, import what exists but is missing from state, or state rm what state thinks exists but the API deleted. Do not start a second apply from a second laptop against the same key if the lock is doing its job — wait or unlock with proof.
Stuck lock: confirm the runner is dead. Then unlock. If you unlock a live apply, you get corrupted state. That is why use_lockfile exists.
Security
| Control | Failure if skipped |
|---|---|
| Encrypted, versioned, private state bucket | State leak is a credential leak |
use_lockfile | Two applies, split-brain |
| OIDC / scoped role | Long-lived keys in GitHub |
No secrets in .tf or VCS | History is forever |
Policy on plan (deny public, deny *) | Review fatigue misses the one ACL |
| Separate prod state and prod role | Staging pipeline cannot wipe prod |
prevent_destroy is a seatbelt. RBAC on who can apply is the car.
Troubleshooting table
| Symptom | Look at |
|---|---|
| State locked | Who holds the lock; CI job still running |
| Plan wants replace | Immutable field, count, provider notes |
| Cycle in graph | Hidden depends_on or self-reference |
| Provider auth failed | Wrong account, expired OIDC, clock skew |
| “Object already exists” | State miss — import |
| “Object not found” | State ghost — rm or recreate on purpose |
Download terraform-troubleshooting.md.
Spoken 90 seconds
“I treat state as sensitive production data in S3 with versioning and use_lockfile. Modules are versioned contracts. If apply dies, I reconcile state to reality with import and moves. I do not destroy the VPC to clear a lock, and I do not add DynamoDB locking to a new stack.”
Weak vs strong answer
Weak: “Apply -auto-approve until drift is gone.”
Strong: “I read the destroy line. I adopt, revert, or ignore a named attribute — on purpose.”
Weak: “Destroy the VPC to clear a stuck lock.”
Strong: “Confirm the runner is dead, then unlock. Unlocking a live apply corrupts state.”
Whiteboard in 60 seconds
- Code / state / world. Circle the mismatch.
- Import vs
movedvsstate rm. - TRACE on a half-applied run.
Follow-up ladder
- Plan wants replace — first question? → which field is ForceNew.
- Object already exists? → import.
- Object not found in API, still in state? →
state rmor recreate on purpose. - Two states, one SG? → freeze both applies.
Interview questions
How do you recover a failed apply?
Plan again. Import what exists. Remove ghosts. Do not start a second laptop against the same key.
What is drift?
Reality and state diverged. Console click, failed apply, or another controller.
Challenges C-18, C-19, C-21. Scenarios D-11, D-12, D-13.
Next: Module 4.
You will
- Promote one image digest across environments
- Investigate latency when CPU looks normal
Pipelines, promotion, and GitOps12 min
Pipelines, promotion, and GitOps
Pipelines, promotion, and GitOps
In one sentence: CI proves a commit; CD takes a built digest to an environment; deploy is the act. Rebuilding for prod is how staging lied.
CI vs CD vs deploy
| Term | Job | Typical trigger |
|---|---|---|
| CI | Lint, test, build, scan, sign, push digest | PR and main |
| CD | Promote that digest, apply infra plan, sync cluster | Main, tag, or gitops commit |
| Deploy | The environment actually changes | End of CD or a GitOps reconcile |
People overload the build job with kubectl apply and production keys. That collapses the trust boundary: a fork PR should never be one checkbox from prod.
Immutable promotion: orders@sha256:abc… is what staging ran. Prod pulls the same bytes. Retagging :staging to :prod without digest pin is a weaker cousin — tags move. Digests do not.
PR pipelines: build and test. Do not apply to shared prod. pull_request_target that checks out a fork and assumes your OIDC role is an incident (M-02).
COMMON MISTAKE:
:latestin the Deployment, or a CD job thatdocker buildagain with different build args.
SENIOR-LEVEL EXPECTATION: OIDC to the cloud, environment approvals, and a pipeline identity that cannot empty the account if one workflow is stolen.
Deployment strategies
| Strategy | How it works | Pick when | Cost |
|---|---|---|---|
| Recreate | Down then up | You can tolerate downtime | Simple, brutal |
| Rolling | Surge / unavailable | Default API | Slow bugs hit 100% gradually |
| Canary | Small % then more | You have a real SLI | Needs traffic split and abort |
| Blue/green | Two stacks, flip | Fast revert of edge | Double capacity, sticky sessions |
| Feature flag | Code on, behavior off | Schema and UX uncertainty | Flag debt |
Rolling is what a Deployment does. Canary and blue/green need a service mesh, Ingress weights, or two Services. Say which control you have. “We do canary” without a metric is rolling with extra meetings.
Rollback and databases
kubectl rollout undo or a GitOps revert restores the application digest. It does not rewind a destructive migration.
Expand/contract: add the new column nullable, deploy code that writes both, backfill, switch reads, drop the old. Rollback is possible in the middle. A one-shot DROP is not.
Forward-fix when the bad state is data you cannot revert. Rollback when the digest is wrong and the schema is compatible. Who decides: the incident commander using the SLO, not whoever wants the pipeline to look green.
GitOps
Git is the desired cluster state. A reconciler (Argo CD, Flux, or equivalent) applies it. Benefits: audit, revert is a git revert, no laptop kubeconfig for routine deploys.
Drift: kubectl edit during an incident must be followed by a git commit or the reconciler will undo you — or you disable sync and create a snowflake. Say the break-glass: freeze sync, mitigate, PR the mitigation.
Push-based CD (pipeline applies) is still valid when the team is small or the infra is Terraform-only. Keep it from becoming “whoever has the key applies from main.” Lock, plan file, approval.
Preview environments: great for UI/API PRs; expensive and leaky if they share prod data or prod credentials.
Pipeline security gates
- Pin Actions by digest
- Scan image; fail on policy, not on every CVE noise
- SBOM attached to the digest
- Sign; verify at admission or deploy
- No
docker.sockon the build Pod as a platform feature - Secrets from a manager or OIDC, not repo variables copied into the Dockerfile
C-23–C-27: pipeline failure, safe prod deploy, rollback, security gates, promote immutable artifact.
Order API pipeline you should be able to sketch
- PR: test, build, scan. Artifact is a digest in a registry the PR cannot overwrite in prod.
- Main: sign, attach SBOM, push. Staging Deployment pins that digest.
- Prod: same digest after approval or GitOps sync. Terraform plan for surrounding infra is a separate, locked apply.
- Abort: SLI burn or canary error rate — not a Slack emoji.
If step 2 rebuilds with different build-args than step 1, you do not have promotion. You have two artifacts and a story.
Weak vs strong answer
Weak: “CD rebuilds for prod with production build-args.”
Strong: “Staging ran orders@sha256:…. Prod pulls those bytes. Rebuild is a different artifact.”
Weak: “We do canary” (no metric).
Strong: “I shift 5% only if I have an SLI that sees the canary. Otherwise I am rolling with meetings.”
Whiteboard in 60 seconds
- PR: test/build. Main: sign. Staging then prod: same digest.
- Three strategy boxes: rolling / canary / blue-green.
- Git → reconciler → cluster.
kubectl editloses.
Follow-up ladder
- Why not
:latestin the Deployment? → tags move. - Rollback vs forward-fix? → digest vs data.
- GitOps break-glass? → freeze sync, mitigate, PR.
pull_request_target+ OIDC? → fork-to-prod incident.
Interview questions
CI vs CD vs deploy?
Prove a commit; promote a digest; the environment changes.
Can the pipeline apply Terraform?
Yes, with a lock, a saved plan, and an identity that cannot empty the account.
INTERVIEW TIP: If they ask Helm vs Kustomize, answer in one sentence (templating vs overlays) and return to promotion and revert. This sprint does not require Helm fluency.
Linux, networking, and cloud mapping11 min
Linux, networking, and cloud mapping
Linux, networking, and cloud mapping
In one sentence: Linux essentials and a hop-by-hop path beat a cloud-product quiz. AWS names are an optional translation, not a second course.
Linux essentials (not a second course)
You already used this in Module 1. In interviews, keep it operational:
| Topic | Interview use |
|---|---|
| Processes, PID 1, signals | Graceful shutdown, 137 vs SIGTERM |
| cgroups | OOM vs throttle |
| Disk vs inodes | CI “disk full” that df -h does not show |
| ulimits / fds | “Too many open files” |
| Capabilities | Non-root is incomplete |
| systemd vs container | Nodes have init; containers often should not fake a full OS |
You do not need to be an LFCS instructor. You need to not recommend reboot the node as step one.
The path you must walk out loud
Read the diagram, then say it as a story:
- Browser looks up a hostname.
- DNS returns the load balancer (or anycast) — TTL and cache mean failover is not instant.
- Load balancer (L4 or L7) terminates or passes TLS, health-checks something. If it health-checks the wrong target, you get 502s with quiet app logs.
- Ingress / Gateway routes host and path to a Service.
- Service (usually ClusterIP) selects Ready Pods.
- Pod handles the request in its network namespace; it calls
orders.payments.svcor a remote name. - Database (often *not* in the cluster) — security group, NetworkPolicy, connection pool, TLS.
Failure can be any hop. TRACE starts with impact and recent changes, then you pick the hop with signals — you do not restart kind.
| Symptom | Hop to doubt first |
|---|---|
| NXDOMAIN in the browser | DNS, wrong zone, split horizon |
| Connection timeout to the VIP | LB, SG, NLB vs target |
| 502/504 from the edge | No Ready backends, idle timeout, MTU |
| Connection refused in the pod | Bind 127.0.0.1, wrong port |
| Works on the node, fails in the pod | Routing, DNS, NetworkPolicy, proxy |
| DB “too many connections” | HPA × pool size |
Refuse vs timeout vs TLS fail are different (Q-230). Ping success never proved HTTPS.
Cloud-neutral primitives
Stay here first — this is not the AWS Solutions Architect Interview Sprint.
| Primitive | Problem it solves | Cost surprise |
|---|---|---|
| Account/project isolation | Blast radius | Shared logging still crosses |
| VPC / subnets / routes | Where packets may go | Cross-AZ data |
| NAT | Private subnet egress | Per-GB and idle |
| L4 vs L7 balancer | TCP vs HTTP routing / certs | Health-check mismatch |
| Object vs block vs file storage | Blob vs disk vs shared FS | Putting a DB on object store |
| Managed Kubernetes | Control plane as a service | You still own nodes, addons, IAM, apps |
| Registry | Where digests live | Cross-region pull + scan |
IaaS: you patch machines. PaaS: you patch less and lose some knobs. Managed Kubernetes: the API is theirs; the YAML, the node image, and the IAM are still yours.
Multi-AZ is the usual reliability first step. Multi-region is a product, not a checkbox (Q-185).
Optional AWS mapping (not a curriculum)
Use this table only when the interviewer speaks AWS. Do not study it instead of the path above.
| Portable concern | Optional AWS name |
|---|---|
| Managed Kubernetes | EKS |
| Nodes | EKS managed node groups / Karpenter (name as examples) |
| Container registry | ECR |
| Object store / TF state | S3 (+ use_lockfile) |
| L7 HTTP balancer | ALB |
| L4 balancer | NLB |
| DNS | Route 53 |
| Workload identity | EKS Pod Identity / IRSA |
| Secrets manager | AWS Secrets Manager / SSM (still not “K8s Secret is enough”) |
| Pipeline identity | GitHub OIDC to IAM |
kind remains the lab. An optional EKS path is documented for cost-controlled demos; it is not required for completion or the certificate.
COMMON MISTAKE: Reciting VPC exam trivia and then failing to say why the Pod cannot use the node’s
resolv.confblindly.
SENIOR-LEVEL EXPECTATION: Compare the two paths (node curl vs pod curl) hop by hop before blaming the application.
Weak vs strong answer
Weak: Recites VPC exam trivia, then cannot say why the Pod cannot use the node’s resolv.conf.
Strong: “I walk browser → DNS → LB → Ingress → Service → Pod → DB. I compare node curl vs pod curl before I blame the app.”
Weak: “Ping worked, so HTTPS is fine.”
Strong: “Refuse vs timeout vs TLS fail are different. Ping never proved checkout.”
Whiteboard in 60 seconds
- Seven hops, left to right.
- Mark where 502 usually lives (no Ready backend).
- Optional AWS names under the portable boxes — only if they asked.
Follow-up ladder
- NXDOMAIN? → DNS / split horizon.
- Works on the node, fails in the pod? → DNS, NetworkPolicy, bind address.
- DB too many connections? → HPA × pool size.
- Multi-region first? → usually no. Multi-AZ first.
Interview questions
Walk a 504.
TTL, idle timeout, Ready backends, then the pod, then the pool.
kind vs EKS on this path?
Same objects. Cloud LB and IRSA are overlays. The lab stays kind.
INTERVIEW TIP: If they pull you into a 20-minute AWS SA recap, say: “I can map these boxes. I would rather walk the checkout 504 on this path.” Then TRACE.
Observability, SRE, and DevSecOps12 min
Observability, SRE, and DevSecOps
Observability, SRE, and DevSecOps
In one sentence: Logs, metrics, and traces answer different questions. SLIs measure user pain. Security is both a pipeline and a runtime property. A scanner sticker is not enough.
Three signals
| Signal | Good for | Bad as the only tool |
|---|---|---|
| Metrics | Rate, saturation, cheap alerting | “Why *this* order failed” |
| Logs | The exact error, audit | Cardinality if you log every field as a metric label |
| Traces | Where time went across services | Storage cost; you must sample on purpose |
Structured logs with a correlation / trace id. Never tokens, passwords, or raw cards. The Order API should log order_id and status, not the payment blob.
Golden signals (latency, traffic, errors, saturation) still work. Pair them with RED and USE.
RED and USE
| Method | Stands for | First dashboard |
|---|---|---|
| RED | Rate, Errors, Duration | User-facing request path (checkout) |
| USE | Utilization, Saturation, Errors | Resources: node disk, CPU throttle, conntrack, pool |
A 50% CPU service can be saturated on thread pools or connection pools. Utilization is not the whole story (Q-209).
SLI, SLO, SLA, error budget
| Term | Who feels it |
|---|---|
| SLI | The measurement (successful checkouts / attempts) |
| SLO | The internal target (99.9% over 30 days) |
| SLA | What you promised a customer (usually looser, with credits) |
| Error budget | 1 − SLO; how much unreliability you can *spend* on change |
CPU is a poor SLI. Users do not buy CPU. They buy HTTP 200 in a time bound, or “order created.”
When the budget is exhausted, you slow the payments refactor — that is a policy conversation (M-04), not a dashboard color.
Alert on symptoms (burn rate of the SLI) with multi-window multi-burn (Q-206). Cause alerts (disk 80%) belong on a team that owns disk, or as tickets, not as 3 a.m. pages when users are happy.
Cardinality: user_id as a metric label will melt the TSDB. Use logs or traces for high-cardinality identity.
TRACE is how you operate
You already have the table in DEPLOY-IT. In this lesson, connect it to signals:
| TRACE step | Observability move |
|---|---|
| Triage impact | Which SLI, how much budget, which region |
| Review changes | Deploy annotations, Terraform apply, flags — on one timeline |
| Analyze signals | Trace the 504; do not trust Ready on payments |
| Dependencies & capacity | Pool, disk, conntrack, lock |
| Mitigate then cause | Canary off, then the bad probe |
Toil is manual work that does not add enduring value. Automate the weekly drain checklist; do not automate a vague “fix production” button.
Blameless postmortem: name the systemic gap and the owner of the *fix*, not the human to punish.
DevSecOps — shift left without abandoning runtime
| Gate | Still needed at runtime |
|---|---|
| Dockerfile review, non-root | PSS / admission |
| Scan + SBOM + sign | Verify digest; reject unsigned |
| Least-privilege SA in CI | Runtime SA cannot create clusterroles |
| No secrets in git | Rotation, etcd encryption, external store |
| NetworkPolicy in code | Default-deny actually applied |
| OIDC / workload identity | No static keys in Secrets |
Kubernetes Secrets remain not magic. Privileged and hostPath remain cluster incidents. docker.sock remains host root.
CVE triage: block what is reachable in the final image and exploitable in your threat model. Do not halt the company on a noise CVE in a unused builder package you did not ship — and do not ignore openssl in the runtime stage.
Spoken 90 seconds
“I SLI checkout success and latency, SLO it, and page on burn rate. RED on the API, USE on nodes and pools. Traces find the liar that is still Ready. TRACE before exec. Security is pin, sign, verify, identity, and policy — a scanner badge is not a control.”
COMMON MISTAKE: Alerting on CPU 80% while the SLO is green — and missing the 502.
SENIOR-LEVEL EXPECTATION: Write a two-window burn-rate alert and refuse four nines you cannot measure.
Weak vs strong answer
Weak: “We alert on CPU 80%.”
Strong: “I page on SLI burn. CPU is a cause signal. Users buy checkout 200s.”
Weak: “We have a scanner badge.”
Strong: “Pin, sign, verify, identity, and policy. A sticker is not a control.”
Whiteboard in 60 seconds
- Logs / metrics / traces + one correlation id.
- RED on checkout, USE on node and pool.
- SLI → SLO → SLA → error budget.
Follow-up ladder
- Why is CPU a poor SLI? → users do not buy CPU.
- High-cardinality
user_idas a label? → melts the TSDB. - Ready but 2s p99? → probes are not observability.
- Four nines you cannot measure? → refuse the SLO.
Interview questions
RED vs USE?
Request path vs resources. A 50% CPU service can still be saturated on the pool.
What is an error budget?
1 − SLO. Spend it on change. Exhausted means you slow the refactor.
INTERVIEW TIP: Certificate reminder if they ask: this sprint’s paper is a BayLearn completion certificate, not an SRE or CKA cert.
Download the full lab (all code)
Docker + Kubernetes + Terraform production lab: sample Order API, multi-stage Dockerfile, kind manifests, local Terraform, and TRACE break/fix. Unzip and run locally. BayLearn does not execute candidate code.
Download cd-production-lab.zipYou will
- Run the local lab path
- Inject a failure and recover without guessing
Lab 501 — Production deployment (LAB-CD-501)35 min
Lab 501 — Production deployment (LAB-CD-501)
Production deployment lab (LAB-CD-501)
In one sentence: Build the Order API image, run it on kind, validate the Terraform that would surround it, and read the pipeline as a promotion story — all on your laptop.
What you are proving
The architecture prompt (ARCH-01): package a backend Order API, deploy it to Kubernetes, provision supporting infrastructure with Terraform, automate delivery, observe it, then break and fix it.
Start: application, Docker, registry (local or a throwaway tag).
Evolve: Kubernetes, Service / Ingress, Terraform, CI/CD, logs / metrics / traces.
Discuss: multi-stage, non-root, probes, requests/limits, rolling updates, state + locking, immutable promotion, canary vs blue/green, TRACE, rollback vs forward-fix.
You will not stand up a billed EKS cluster in this block. You will stand up kind and talk the optional mapping table if asked.
Prerequisites
| Tool | Policy (13 Sep 2026) |
|---|---|
| Docker Engine + Buildx | Current stable |
| kind | v0.30+ (around v0.33) |
| kubectl | Matches lab APIs 1.31+ |
| Terraform | >= 1.11 (validate/plan; 1.15.x current stable) |
| Python | 3.12+ for the sample app tests |
Exact pins: docs/interview-sprints/cloud-devops/TOOL_VERSION_POLICY.md. Full operator notes: docs/interview-sprints/cloud-devops/PRODUCTION_LAB.md.
Suggested 25-minute path
- App sanity — in
labs/production-deployment/app, run the documented pytest. You are not here to redesign FastAPI. - Image — read the Dockerfile. Confirm multi-stage, numeric USER, no
.envin context, exec-form PID 1. Build. Hit/healthon the published port. - kind — create (or reuse) the lab cluster. Apply the workload YAML. Confirm:
- Pod Ready
- Service ClusterIP has Endpoints
- probes are not liveness-on-Postgres
- requests and limits are present
- Terraform —
fmt -check,validate,planin the lab stack. Read the backend block. If the example shows S3, it must showuse_lockfile = true. A local backend in the lab is fine for validate; your spoken production answer is S3 + lockfile. - CI — open the GitHub Actions (or equivalent) YAML. Confirm: build and scan on PR; no prod apply on fork; digest as the artifact.
If a step fails, do not skip to Module 6 pretending. TRACE it or pick the matching challenge (C-01, C-06, C-08).
What “done” looks like in an interview
You can screenshare or narrate:
docker buildproduced a digest you can namekubectl get deploy,po,svc,eptells a consistent storyterraform validateis green- You can explain what you would add for Ingress on kind (controller) versus a cloud LB
- You know how you will delete the kind cluster and images so the laptop is clean
Safety
- No cloud credentials in the repo.
.env.examplehas placeholders only. - Do not commit
terraform.tfstateor kubeconfigs. - BayLearn staff do not execute your cluster. If something looks like “paste us your AWS keys,” refuse.
COMMON MISTAKE: Applying cloud-only annotations on kind and declaring Kubernetes broken.
SENIOR-LEVEL EXPECTATION: Separate portable workload YAML from cloud overlays. The lab tests the portable path.
What you say if a tool is missing
No Docker: you still walk the Dockerfile and the YAML; you do not invent a passing lab.
No kind: kubectl apply --dry-run=client plus a honest gap.
No Terraform binary: you still write the backend block with use_lockfile and explain validate vs plan.
No AWS account: completion is still valid. Optional EKS is extra credit with a budget, not a certificate requirement.
The mock can proceed on narration. The lab is how you earn confidence, not a hidden industry exam.
Document what you actually ran (cluster name, digest prefix, validate output) in a note for Module 7. Interviewers prefer a short honest lab log over a claim that “EKS is up” with no cluster.
If you finish early, do not install extra addons for sport. Open C-08 or D-09 and TRACE. Extra mesh is how the 35-minute block evaporates.
Cleanup before you leave the machine: kind delete, remove lab image tags, no leftover tfstate in git. See docs/interview-sprints/cloud-devops/COST_AND_CLEANUP.md.
Weak vs strong answer
Weak: “EKS is up” with no cluster and a cloud annotation that kind cannot satisfy.
Strong: “ClusterIP is Ready. Ingress needs a controller I did not install. Terraform validate is green. I can delete the kind cluster.”
Whiteboard in 60 seconds
- App → image → kind → ClusterIP → Terraform local → CI.
- Star optional AWS as an overlay, not the completion path.
- Write the cleanup: kind delete, no tfstate in git.
Follow-up ladder
- No Docker? → walk the Dockerfile and YAML honestly.
- No kind? →
kubectl apply --dry-run=client. - Why not minikube? → this sprint’s lab is kind only.
- Is AWS required for the certificate? → no.
Interview questions
What does done look like?
A named digest, get deploy,po,svc,ep consistent, terraform validate green, a cleanup plan.
What do you refuse?
Cloud credentials in the repo. Staff executing your cluster. Claiming EKS without a bill you meant to pay.
INTERVIEW TIP: Timebox. A working ClusterIP plus a honest “Ingress controller not installed” is better than a half-mesh.
Next: Break/fix.
Lab pack README
Lab pack README
Labs — Cloud DevOps Interview Sprint
Hands-on work for LAB-CD-501. Nothing here is executed on BayLearn
servers. You run Docker, kind, and Terraform locally.
| Lab | Path | What you practice |
|---|---|---|
| Production deployment | `production-deployment/` | Multi-stage image, kind (not minikube), ClusterIP + probes, Terraform validate without AWS credentials, break/fix |
From production-deployment/:
bash
scripts/validate-lab.sh # pytest, terraform, kubectl dry-run, docker, kind if present
scripts/kind-up.sh && scripts/deploy-local.sh
scripts/break-fix.sh # then restore with scripts/deploy-local.sh
scripts/cleanup.shStudent zip (generated by scripts/pack_lab_zip.sh):
course-ui/downloads/cd-production-lab.zip
Rules
- No cloud credentials in the repo
- No remote code execution
- kind only — do not switch the lab to minikube
- Kubernetes Secrets in the manifests are dummy values
- Terraform remote state: S3 +
use_lockfile = true(DynamoDB locking is deprecated) - Optional AWS/EKS path is documentation only and is not required to finish
Production lab README
Production lab README
LAB-CD-501 — Production deployment lab
Package a tiny Order API, run it as a non-root image, deploy it to kind,
record intent with Terraform, and break it on purpose.
BayLearn does not execute your Docker / Kubernetes / Terraform remotely.
Success is pytest, docker build, terraform validate, and a kind
rollout on your machine.
kind only. Not minikube.
text
app/ FastAPI Order API (in-memory)
docker/ Multi-stage, non-root, no credentials
kubernetes/ Probes, resources, ClusterIP, example Ingress/HPA
terraform/ Local validate (no AWS creds) + optional AWS mapping
scripts/ kind-up, deploy-local, break-fix, cleanup
docs/ LOCAL.md · AWS.md · CLEANUP.mdQuick start
bash
# 1. App
cd app && python3.12 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]" && pytest && cd ..
# 2. Cluster
scripts/kind-up.sh
scripts/deploy-local.sh
# 3. Terraform (no cloud account)
cd terraform/environments/local
terraform init -backend=false
terraform validateReach the ClusterIP Service with port-forward, not NodePort:
bash
kubectl --context kind-baylearn-cd -n baylearn-lab port-forward svc/order-api 8080:80
curl -sS http://127.0.0.1:8080/healthWhat to say in the interview
- Multi-stage image: build tools stay out of the runtime layer.
- Non-root
USER+readOnlyRootFilesystem+ dropped capabilities. /healthis liveness (cheap)./readyis readiness (config present).- Requests schedule the pod; limits cap it. Missing requests is a noisy-neighbor bug.
- ClusterIP is the default. Ingress is the edge. NodePort is a lab shortcut.
- Kubernetes Secrets are base64, not encryption. Dummy values only in this repo.
- Terraform state is the source of truth. Team lock is S3
use_lockfile = true.
DynamoDB locking is deprecated.
- In-memory orders are not shared across replicas — that is the RDS talking point.
Safety
.env.examplehas no secrets.kubernetes/secret.yamlis a dummy token plus a warning.- CI does not log in to a registry and does not run a paid scanner.
- Optional AWS path is documented only. See
docs/AWS.md.
Break / fix
bash
scripts/break-fix.sh # one random fault
scripts/deploy-local.sh # restore
scripts/cleanup.sh # kind + local Terraform filesMore: docs/LOCAL.md.
Local path
Local path
Local path (kind)
This is the path that completes LAB-CD-501. No AWS account.
Prerequisites
- Docker Engine
- kind (not minikube)
- kubectl
- Python 3.12+ (for app tests)
- Terraform >= 1.11 (for
validate;applyis optional and writes local files only)
App tests (no cluster)
bash
cd app
python3.12 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytestCopy .env.example to .env if you run uvicorn on the host. It contains no secrets.
bash
APP_ENV=local uvicorn app.main:app --reload --app-dir srcCluster
bash
scripts/kind-up.sh
scripts/deploy-local.sh
kubectl --context kind-baylearn-cd -n baylearn-lab port-forward svc/order-api 8080:80bash
curl -sS http://127.0.0.1:8080/health
curl -sS http://127.0.0.1:8080/ready
curl -sS -X POST http://127.0.0.1:8080/orders \
-H 'Content-Type: application/json' \
-d '{"customer_id":"cust-1","sku":"SKU-42","quantity":2}'The Service is ClusterIP. Port-forward is how you reach it from the laptop.
Do not treat NodePort as the production default.
Ingress and HPA manifests are examples. kind has no ingress controller or
metrics server unless you install them.
Terraform (no cloud credentials)
bash
cd terraform/environments/local
terraform init -backend=false
terraform validate
terraform apply # writes generated/*.json onlyRemote state for a team is S3 with use_lockfile = true. DynamoDB locking
is deprecated. See the comments in main.tf and docs/AWS.md.
Break / fix
bash
scripts/break-fix.sh # random fault
scripts/break-fix.sh missing-env
scripts/deploy-local.sh # restore (recreates the Deployment so maxUnavailable: 0 cannot deadlock)Faults: wrong-image, broken-probe, missing-env, bad-port, low-memory.
deploy-local.sh deletes and re-applies the Deployment on purpose. After a fault, a not-Ready surge pod plus maxUnavailable: 0 can stall a plain kubectl apply forever. The YAML still teaches the safe-roll fields; restore is a recreate.
Validate (offline + Docker; kind if the cluster exists)
bash
scripts/validate-lab.shCleanup
bash
scripts/cleanup.shCleanup
Cleanup
Cleanup
Local (default)
Idempotent:
bash
scripts/cleanup.shThat deletes the kind cluster baylearn-cd, removes the local image tag,
and drops Terraform local state / generated/ files.
Manual equivalent:
bash
kind delete cluster --name baylearn-cd
docker image rm -f baylearn/order-api:local
rm -rf terraform/environments/local/.terraform \
terraform/environments/local/generated \
terraform/environments/local/terraform.tfstate*App virtualenv (optional): rm -rf app/.venv.
Optional AWS
If you created EKS / ECR / RDS / NAT:
- Delete Kubernetes workloads in the EKS cluster.
terraform destroyin the environment that created the cluster.- Empty ECR if the repository remains.
- In the console, confirm no NAT Gateway, ELB, unattached EBS, or orphan ENI.
- Keep the S3 state bucket only if you still need the state object.
Forgotten NAT + EKS is the common training-account surprise. Budget alarms
first; destroy the same day you apply.
Read the lab source
Same files as the zip. Open one at a time — map the function to the interview sentence.
Loading module…
Break/fix with TRACE10 min
Break/fix with TRACE
Break/fix — practice TRACE on purpose
In one sentence: Inject one failure into the lab (or open a D-series scenario), narrate TRACE, mitigate, then name the root cause in one sentence.
Why we break a working lab
Operating is not a lecture. Interviewers watch whether you triage impact before kubectl exec, whether you look at the last change, and whether you halt a roll before you invent a novel CNI theory.
Pick one injection (10 minutes)
Do one. Write the TRACE letters as you go.
| Injection | How | You should discover |
|---|---|---|
| Empty Service | Flip a label on the Service selector | Endpoints empty; app still Ready |
| Bad liveness | Point liveness at a missing path or at “Postgres” | Restart storm |
| Wrong image tag | :latest or a typo digest | ImagePullBackOff |
| Bind localhost | App listens on 127.0.0.1 | Refused from Service IP |
| Resource trap | Memory limit 32Mi | OOMKilled 137 |
| Locked apply story | (Discussion) two applies, one key | use_lockfile, do not destroy |
Alternatively, play D-01 CrashLoop, D-06 readiness, D-08 Service unreachable, D-09 Ingress 502, or D-11 state locked in the player — same spoken discipline.
TRACE script (say it)
- Triage impact — “Checkout 5xx for users hitting
/orders. Lab-only, one namespace. SLI would be success rate; here it is curl from my laptop.” - Review recent changes — “I changed the Service selector” or “the last apply was 1.14.”
- Analyze signals — Events,
describe, logs,get ep. Ready on the pod does not mean the Service is honest. - Dependencies & capacity — DNS, disk, the fake payments dependency if you added one.
- Mitigate then cause — put the selector back (mitigation). Then say: “Root cause was a label mismatch, not a cluster failure.”
If you skip to kind delete cluster, you failed the exercise even if you eventually “fix” it.
What to write down for Module 7
- One keep: the signal that told the truth (
get endpoints) - One change: the command you typed too early
- One follow-up challenge if you needed more than ten minutes
COMMON MISTAKE: Fixing silently and telling the interviewer “it works now” without the cause.
SENIOR-LEVEL EXPECTATION: Separate mitigation (restore traffic) from elimination (commit the YAML, add a test, add a policy).
Weak vs strong answer
Weak: kind delete cluster then “it works now.”
Strong: “Impact is lab-only checkout. Last change was the selector. Endpoints empty. I put the label back, then I say the cause.”
Whiteboard in 60 seconds
- TRACE across the top.
- One injection box (selector / probe / image / bind / OOM / lock).
- Mitigation arrow vs root-cause sentence.
Follow-up ladder
- Ready but no traffic? → Endpoints / selector.
- Restart storm? → liveness hitting a dependency.
- 137? → memory limit, not “add nodes first.”
- Two applies, one key? → lockfile, do not destroy.
Interview questions
Why break a working lab?
Operating is scored. Interviewers watch order, not luck.
What do you write for Module 7?
The signal that told the truth, the command you typed too early, one follow-up D-scenario.
INTERVIEW TIP: In the mock they will inject a story, not always a live cluster. The letters stay the same.
Next: Module 6 — mock.
You will
- Sit a 45–60 minute mock
- Leave with a weighted score and 7-day plan
Mock process10 min
Mock process
Mock interview process
In one sentence: Pick a mode, run the timer, speak deploy / automate / operate, score 1–5 with the published weights, and write feedback a human can use on Monday.
Before the clock
- Mode from profile or instructor override.
- Candidate has Module 0 bars and, ideally, a kind lab they can refer to.
- Instructor (BayAreaLa8s Team) has the scenario JSON (
modules/module-6-mock/scenarios.json) and the scorecard. - Screen share optional. Whiteboard or a gist is enough. Live kind is a bonus, not a gate.
Agenda shape (all modes)
| Slice | You should hear |
|---|---|
| Background | What they own vs hope someone else owns |
| Docker / Linux | USER, PID 1, digest, no secrets |
| Kubernetes | Ready vs live, ClusterIP, a roll |
| Terraform | S3 use_lockfile, 1.11+; DynamoDB is legacy |
| CI/CD | Promote digest; no PR-to-prod |
| Operate | TRACE on an injected failure |
| Their questions | They interview you back |
Exact minutes differ by mode (M-01 is 45; others 60). Do not skip Terraform locking to save time — it is a scoring landmine.
How to answer (candidate)
- Repeat the constraint (“kind is fine; I’ll map EKS only if needed”).
- Deploy: a concrete image and YAML shape.
- Automate: one digest, locked apply.
- Operate: TRACE letters in order when they say “it is broken.”
- Name a trade-off and something you refuse.
Do not dump twenty kubectl commands. Do not design a service mesh unless they ask.
How to score (instructor)
Each dimension 1–5. lib/scoring.js weights:
| Dimension | Weight |
|---|---|
| Containers | 0.10 |
| Kubernetes | 0.20 |
| Terraform | 0.17 |
| CI/CD | 0.10 |
| Linux / Networking | 0.08 |
| Cloud | 0.07 |
| Observability / Reliability | 0.10 |
| Security | 0.06 |
| Troubleshooting | 0.08 |
| Communication / Trade-offs | 0.04 |
Contribution is rating * 20 * weight. All fives → 100. Edit comments before the learner sees them. Deduct Troubleshooting if they restart the cluster before impact. Deduct Terraform if they propose DynamoDB as the modern lock.
Disclaimer on every report: This score measures rehearsal performance against the BayLearn Cloud DevOps rubric. It does not predict a hiring outcome.
After the clock
Three keeps, three changes, two weak bars → Module 7 plan. Do not invent a new industry certification name on the feedback form.
COMMON MISTAKE: Treating the mock as a quiz of leftover trivia from Module 2.
SENIOR-LEVEL EXPECTATION: Lead and platform modes score *refusal* and blast radius as heavily as YAML.
Weak vs strong answer
Weak: Twenty kubectl commands, no trade-off, DynamoDB lock on a new stack.
Strong: “Deploy this digest. Automate with use_lockfile. Operate with TRACE. I refuse :latest and PR-to-prod.”
Whiteboard in 60 seconds
- Deploy / automate / operate across the top.
- One YAML shape, one backend block, one TRACE.
- A refuse list: latest, laptop apply, every DB in Kubernetes.
Follow-up ladder
- Which mode? → engineer 45 vs platform 60.
- Why Kubernetes is 20%? → most DevOps screens die on Ready / Endpoints.
- Why Terraform is 17%? → lock and state, not HCL trivia.
- Does 92 predict an offer? → no.
Interview questions
What must I say about locking?
S3 use_lockfile on 1.11+. DynamoDB is legacy.
What gets deducted first?
Restarting the cluster before impact. Laptop apply to prod.
INTERVIEW TIP: Ask where state lives and who can apply. The answer tells you more than a memorized provider argument.
Next: Feedback & 7-day plan.
You will
- Read the readiness report
- Practice the weakest two skills first
Feedback and 7-day plan10 min
Feedback and 7-day plan
Feedback and the 7-day plan
In one sentence: Turn two weak dimensions into seven dated rehearsals. Do not open 240 questions as a novel.
Read the score like an adult
| Status (mock) | Range | Monday move |
|---|---|---|
| Needs Foundation | 0–49 | Redo Module 1–2 lessons out loud. C-01, C-08. |
| Developing | 50–64 | Lab + D-01 + locking backend from memory |
| Interview Capable | 65–74 | Two TRACE scenarios + C-24 / C-27 |
| Interview Ready | 75–84 | Full mock again in 5 days; work the lowest dimension |
| Strong | 85–92 | Lead probes: what you refuse; paved road |
| Exceptional | 93–100 | Teach someone else TRACE and use_lockfile |
These bands are not Module 0’s Foundation / Developing / Interview Capable / Interview Ready / Advanced cut-points. Do not mix reports.
The mock number is rehearsal. It does not predict hiring.
Default 7-day plan
Used when the player does not override with your weak skills:
| Day | Focus | Why |
|---|---|---|
| 1 | Docker + container security | Deploy starts at USER and PID 1 |
| 2 | Kubernetes workloads + Services | Empty Endpoints fail more people than etcd trivia |
| 3 | Kubernetes operations + TRACE | Operate |
| 4 | Terraform + state + modules | use_lockfile, not DynamoDB |
| 5 | CI/CD + deployment strategies | Promote the digest |
| 6 | Observability + production troubleshooting | RED/USE + a 502 |
| 7 | Full DevOps mock | Rehearse the frame under the clock |
Swap days 1–6 so your weakest Module 6 dimensions land on days 1–3.
Daily practice recipe (45–70 minutes)
- Speak one question from interview-questions.md for 90 seconds.
- Do one challenge or one D-scenario.
- Redraw one diagram from memory (Browser→DB, state+lock, or TRACE).
- Write one “I refuse …” sentence (latest tags, PR-to-prod, laptop apply, every DB in Kubernetes).
Ten spoken answers beat fifty skims. Practice that way this week.
Certificate and honesty
If you complete the course, you may receive BayLearn Certificate of Completion: Cloud DevOps Interview Sprint — Docker + Kubernetes + Terraform. Put it on a résumé as a BayLearn course. Do not expand it into CKA.
The mock score disclaimer stays on any screenshot you share with a coach.
COMMON MISTAKE: Booking another mock immediately without doing days 1–3.
SENIOR-LEVEL EXPECTATION: The plan names artifacts (C-18, D-09, a backend block written from memory), not “review Kubernetes.”
INTERVIEW TIP: Bring the 7-day plan to a real on-site as your warm-up list. Interviewers like people who already know their gaps.
Weak vs strong answer
Weak: “Review Kubernetes” as the whole week.
Strong: “Day 1 C-01. Day 2 C-08. Day 4 write the backend block from memory. Day 7 remock.”
Whiteboard in 60 seconds
- Two weak dimensions on days 1–3.
- One diagram a day: Browser→DB, state+lock, TRACE.
- One refuse sentence a day.
Follow-up ladder
- Mix Module 0 bands with Module 6 bands? → no.
- Book another mock tomorrow? → not before days 1–3.
- Put CKA on the résumé? → no. BayLearn completion only.
Interview questions
What is a daily block?
90-second spoken answer, one challenge or D-scenario, one diagram from memory.
What artifact proves the week worked?
A second mock score and a backend block you can write without notes.
You are done with the curriculum spine. Downloads and the 240-question index are for the week after.
Pricing
Choose a delivery mode. BayAreaLa8s invoices after you request a session.
This text is a draft. It is not a current BayLearn offer and it does not change existing bookings. Read the draft refund policy
Self-paced
Small group
Live 1:1
$349
Introductory $299
Book a session
Request a slot. Invoicing is handled by BayAreaLa8s after the request — no Stripe checkout.