Define the Minimal Service and Its Cost Boundary
A capstone is a release a reviewer can reject. You will operate one small internal service on Kubernetes, split it across two roots and one data surface, promote one immutable image, prove it with positive and negative cases, break it once on purpose, and hand over six deliverables. The system is deliberately dull; the evidence is the work.
The service is an append-only ledger behind a ClusterIP Service. One StatefulSet, one replica, one 1Gi claim and four routes. A client pod in the same namespace appends an entry, reads it back by id, and asks whether the process is alive or actually ready. Nothing is reachable from outside the cluster.
| Route | Method | Data call | What it proves |
|---|---|---|---|
/entries | POST | writes one file, then fsyncs it | the write path and the claim |
/entries/{id} | GET | reads one file | the read path and the not-found branch |
/healthz | GET | none | the process is running |
/readyz | GET | writes and removes a sentinel file | the volume, the mount and the permission |
One small file per entry is a design choice that pays for itself twice. A single append-only log would turn the failure in the last section into a truncation problem with an open file handle. One file per entry makes a read a directory lookup and makes a bad record removable by deleting one file, which is exactly the recovery the lab needs.
No Ingress and no load balancer is a cost decision as much as a security one. A ClusterIP Service needs no certificate, no DNS record and no hourly charge, and it keeps the acceptance test inside the cluster where the network policy is the only boundary under test. An ingress controller would add a second data plane and a second owner to a project that already has four surfaces.
Identity is two service accounts with almost nothing between them. The runtime identity holds no grant at all and does not mount a token, so a compromised container has nothing to present. The verifier identity may read pods and pod logs in this namespace and do nothing else, which gives the negative case a precise expected answer.
Sharing a cluster is a prerequisite, not an assumption. The namespace, the StorageClass and the CNI belong to someone else, and each answer either changes the design or stops it.
| Prerequisite | How to verify | If it fails |
|---|---|---|
| A namespace you may write to | a dry-run create of the ConfigMap | request the namespace and record the delay |
| A CNI that enforces policy in both directions | the plugin's documentation plus a running policy agent on every node | choose another cluster; a stored policy is not isolation |
| A CSI driver and a StorageClass | read the class list and its provisioner | create the class in the platform root, or stop |
| Pod Security at restricted | one deliberately privileged pod in a scratch namespace | lower the level as a written decision with its own owner |
| A registry the nodes can pull from | one pull from a node, not from your laptop | use a registry the cluster already trusts |
| A named reviewer and approver | both names in D1 | the capstone has no gate |
The cost ceiling is a number with stop rules. Set USD 15 for a 72-hour window, then bound every driver that could reach it. A budget alert is a lagging signal, so the stop rules are what actually end the spend.
| Driver | Bound written into the scope record | What breaks the ceiling |
|---|---|---|
| Nodes | two small nodes, or an existing sandbox pool | autoscaling enabled with a high maximum |
| Persistent disk | one 1Gi claim with Retain | a claim per rollout, or a snapshot schedule |
| Image storage | one repository, a bounded set of digests | pushing every build forever |
| Traffic | ClusterIP only | a LoadBalancer Service added "just to check" |
| Control plane | the cluster's existing managed fee | a second cluster for the denied namespace |
| Observability | cluster-default events and pod logs | a per-request log line carrying the payload |
Scope is two lists, and the exclusion list is the useful one. "The service" cannot fail a test; "one namespace, one StatefulSet, one claim, one port" can.
| Boundary | Included | Excluded |
|---|---|---|
| Traffic | one ClusterIP Service on port 8080 | Ingress, load balancers, certificates |
| Compute | one replica, one pinned image, one ConfigMap | autoscaling, a second workload |
| Data | one 1Gi claim per ordinal, Retain | snapshots, replication, in-place migration |
| Operations | pod logs, events, two plans | a log pipeline, dashboards, on-call |
Figure 1 is the decision the scope record has to make before the first apply.
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','titleColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','signalColor':'#5a6e82','noteBkgColor':'#c4873b','noteTextColor':'#132440','fontFamily':'DM Sans, sans-serif'}}}%%
flowchart TD
S["Scope record
one namespace, one StatefulSet, one 1Gi claim"] --> P{"Shared cluster or
dedicated sandbox?"}
P -->|"shared"| A["Namespace-scoped access
the cluster owner applies the platform root"]
P -->|"dedicated"| B["Cluster admin
one person holds both roots"]
A --> Q{"Does the CNI enforce policy
in both directions?"}
B --> Q
Q -->|"no"| X1["Stop
a stored policy is not isolation"]
Q -->|"yes"| C{"CSI driver and
a StorageClass?"}
C -->|"no"| X2["Stop
create the class, or pick a cluster"]
C -->|"yes"| D["Cost ceiling USD 15
with its stop rules"]
D --> R{"Reviewer accepts D1?"}
R -->|"no"| X3["Stop
no credential issued"]
R -->|"yes"| K["Platform root, then workload root
one image digest pinned"]
classDef primary fill:#132440,color:#ffffff,stroke:#0b172b;
classDef secondary fill:#16476A,color:#ffffff,stroke:#0f314a;
classDef ok fill:#3B9797,color:#ffffff,stroke:#2a6f6f;
classDef danger fill:#BF092F,color:#ffffff,stroke:#7a0420;
classDef warn fill:#c4873b,color:#132440,stroke:#8a5a1f;
class S,R primary;
class P,Q,C,D warn;
class A,B,K secondary;
class X1,X2,X3 danger;
The same requirement can pass one check and fail the next. A cluster that enforces policy but has no CSI driver stops at the claim, and a cluster with storage but no enforced policy passes every apply and fails the denied case. Figure 2 separates the four surfaces so the owner of each gap is obvious before anyone builds.
Six deliverables keep the project reviewable. Each one is an artifact a reviewer can open, not a claim in a chat message.
| ID | Deliverable | Accepted when |
|---|---|---|
| D1 | Scope, cost and prerequisite record | one namespace, one claim, a ceiling and its stop rules |
| D2 | Ownership matrix | every object has one root, one state key and one owner |
| D3 | Two applied roots | platform then workload, no console edits, no extra objects |
| D4 | Promotion record | plan digest and image digest approved together, applied once |
| D5 | Acceptance matrix | positive and negative cases, each with its evidence source |
| D6 | Failure and cleanup report | one controlled failure recovered, two no-change plans, an inventory |
A prerequisite that fails during acceptance is a mystery; one that fails during preflight is a decision. The difference is whether the answer was written down before the first apply, and D1 is where it lives.
Partition Identity, State, Artifacts and Data Ownership
Two roots exist because two lifetimes fail differently. The platform root owns what outlives the workload: the namespace, the StorageClass and the state key that describes them. The workload root owns only namespaced objects that can be destroyed and rebuilt. Neither root owns the claim, because the StatefulSet controller creates it.
State keys are named for the boundary. Write them as platform/cluster and workload/capstone-j in the team's existing remote backend, and let the platform root own the bucket policy and the lock. A workload root that creates its own backend has made the state a workload resource.
Backend recovery is independent of workload deletion. Because destroying the workload removes namespaced objects and never the state key, restoring a previous state version is a read taken with the platform identity while the namespace is untouched. A root where the state and the workload share an owner has no such path: the destroy that removed the objects also removed the record of them.
The namespace is the retention boundary, and deleting it is a data decision. Namespace deletion cascades to claims, Secrets and Services. The PersistentVolume is cluster-scoped, so it survives, and the class's reclaim policy decides whether the disk follows. With Retain, the volume moves to Released and the bytes stay until someone with a name decides what they are for.
Identity is partitioned by verb, and one identity has no credentials at all. A shared kubeconfig across plan, apply and runtime is how a namespace-scoped project quietly gains cluster rights.
| Identity | Used by | May do | Must not do |
|---|---|---|---|
| Platform operator | the platform apply job | create the namespace and the StorageClass | create namespaced workloads |
| Workload operator | the workload apply job | apply the objects in one namespace | touch another namespace or a cluster-scoped object |
| Verifier | the acceptance Job | read pods and pod logs in this namespace | create, update or delete anything |
| Runtime | the ledger container | read its mounted ConfigMap, write its claim | present a token to the API server |
A cross-root reference is a variable, never a state read. The platform root publishes the namespace name and the StorageClass name; the workload root consumes them as inputs recorded in the promotion record. Reading the other root's state would give the workload root a transitive read of everything the platform holds, which is a boundary leak that no plan would show.
The registry is outside both roots. If the repository sat in the workload root, destroying the workload would delete the rollback targets at exactly the moment rollback matters. Immutable tags and a bounded retention policy make it a durable surface with one owner.
Figure 3 assigns one owner to each object and turns every cross-root dependency into a named artifact.
Read the map in both directions. Every box has exactly one root, and every arrow is a variable or a template name. An arrow that carries a credential means the boundary leaked, even while both plans stay clean.
Figure 4 follows the mechanics, including the branches that produce a valid plan with the wrong owner.
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','titleColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','signalColor':'#5a6e82','noteBkgColor':'#c4873b','noteTextColor':'#132440','fontFamily':'DM Sans, sans-serif'}}}%%
flowchart TD
B["Platform root applied
namespace, class, state key"] --> K["Workload root planned
namespaced objects only"]
K --> L{"Backend reachable
and lock free?"}
L -->|"no"| X1["Apply blocked
nothing changed"]
L -->|"yes"| A["Workload root applied
one digest, one replica"]
A --> S["StatefulSet controller
creates the claim"]
S --> P{"Claim Bound?"}
P -->|"no"| X2["Pod Pending
read the provisioner event"]
P -->|"yes"| M["Pod mounts the claim
readiness touches the data"]
M --> OK["Two roots applied
one pod Ready"]
S -.->|"template renamed"| X3["New claim, empty disk
old PV Released"]
A -.->|"namespace destroyed"| X4["Claims go with it
Retain decides the disk"]
B -.->|"state key in the workload root"| X5["Destroy removes the record
of what it destroyed"]
classDef primary fill:#132440,color:#ffffff,stroke:#0b172b;
classDef secondary fill:#16476A,color:#ffffff,stroke:#0f314a;
classDef ok fill:#3B9797,color:#ffffff,stroke:#2a6f6f;
classDef danger fill:#BF092F,color:#ffffff,stroke:#7a0420;
classDef warn fill:#c4873b,color:#132440,stroke:#8a5a1f;
class B,A,S primary;
class K,M secondary;
class L,P warn;
class OK ok;
class X1,X2,X3,X4,X5 danger;
A shared object is a bug that presents as drift. Two roots declaring the same object alternate ownership forever, and each apply looks like the other team's mistake.
| Symptom | Collapsed boundary | First evidence |
|---|---|---|
| A plan rewrites the namespace the workload did not create | both roots declare it | the plan address list |
| Init fails after the namespace is gone | the state key lived in the workload root | the backend error at init |
| The claim survives a teardown with no owner | Retain was chosen, and inventory was not | the cluster and cloud volume lists |
| The pod starts on a new empty disk | the claim template name changed in a release | the new claim's UID |
The matrix is reviewed before the first credential. A boundary that exists only in a diagram is a preference. The matrix is what an operator reads at three in the morning, when the question is who may delete the claim and who has to sign for it.
Promote a Reviewed Plan and Immutable Application Artifact
Promotion is two digests and one signature. The image digest is what ran the tests, the plan digest is what describes the infrastructure change, and the approval covers both at the same moment. A plan approved against one digest and applied with another is an unreviewed deployment with a reviewed filename.
| Field | What it records | Why it matters |
|---|---|---|
| Commit and tree | the configuration that was reviewed | a moved branch invalidates the plan |
| Toolchain | Terraform 1.17.1, hashicorp/kubernetes 3.5.0 | a different producer makes a different plan |
| Lock file | committed provider selections and hashes | a silent provider upgrade changes behaviour |
| Plan digest | the SHA-256 of the saved plan file | the applied bytes match the reviewed bytes |
| Image digest | the artifact that ran the acceptance cases | the tested code is the promoted code |
| Cluster contract | namespace, class and CNI from D2 | a stale contract plans against the wrong cluster |
| Approver and expiry | a named human and a deadline | approval is for a change, not for a season |
Pin the producer, not just the product. Both roots declare the version constraint and both commit their lock file. The CI image that runs Terraform is pinned by digest too, because a plan built by a different binary is a different plan even when the source is identical.
The artifact is immutable before Terraform sees it. Tags are immutable in the registry, the StatefulSet references an image by digest, and no field anywhere says latest. A rebuild produces a new digest, which is a new release; a moved tag is not a release, it is a coincidence.
Plan and apply are separate jobs with separate identities. The saved plan is encrypted at rest, readable by the named reviewers and the apply role, and kept for the rollback window. The apply job verifies the digest and the approval expiry before it configures the provider.
| Order | Command shape | What it produces or proves |
|---|---|---|
| 1 | terraform init with the root's backend config | the root bound to its own key |
| 2 | terraform plan -out=tfplan | the reviewed change, saved |
| 3 | terraform show -json tfplan | the machine-readable record |
| 4 | shasum -a 256 tfplan | the digest the approver signs |
| 5 | terraform apply tfplan | exactly the reviewed bytes |
| 6 | terraform plan -detailed-exitcode | exit 0 means no drift, 2 means a diff |
The order across roots is part of the design. Apply platform, then workload; destroy workload objects, then take the data decision, then destroy the namespace. That last step is the one place where the usual reverse order is wrong, because the namespace owns the claim and the claim owns the cascade.
There is no schema migration in version one, and that is a decision. The entry format lives in the image, so changing it is an artifact release with its own digest. Changing the claim template is a new claim and an empty disk, which is a migration with a copy step, never a settings edit.
Rollback is a digest and a variable. Because the registry kept the previous image, rollback is a new plan that changes one input to the previous digest, followed by a normal apply. It is still a reviewed change; it simply has a known-good destination and no rebuild.
Figure 5 contrasts the promoted path with the two shortcuts that pass a review without earning it: re-planning after approval, and a tag that is rebuilt between the test run and the apply.
A promotion record is written before the apply and completed after it. The approver, the expiry and both digests go in first; the observed result and the timestamp go in second. A record reconstructed from memory at the end of the day is a story with a hash in it.
Prove the Service Through Positive and Negative Cases
Apply success is the beginning of the evidence. The matrix below is the project's acceptance test, run against the deployed workload with the deployed identities. A case that records a status code without naming the layer that produced it is an anecdote.
| ID | Case | Action | Expected result | Evidence source |
|---|---|---|---|---|
| P1 | Write | append one entry from the client pod | 201 and one new file | response and the entry count |
| P2 | Read back | read the same id | 200 with the stored body | response body |
| P3 | Liveness | call the health route | 200 with no data call | the probe's history |
| P4 | Readiness | call the ready route | 200 after the sentinel write | the pod's Ready condition |
| P5 | Restart | delete the pod and wait for the controller | the earlier entry is still readable | the read plus the new pod name |
| N1 | Other namespace | repeat P2 from the denied namespace | deadline exceeded | an empty server log for that request |
| N2 | Verifier writes | create a pod as the verifier identity | 403 from the API server | the RBAC error text |
| N3 | Privileged pod | apply a privileged container | 403 naming restricted | the admission message |
| N4 | Over-quota pod | request more than the quota has left | 403 naming exceeded quota | the quota message with used and hard |
| N5 | Unknown id | read an id never written | 404 with no write | the response body |
The layer that answers tells you which control failed. Three different owners, three different fixes, and the status code alone will not separate them.
| Result | Decided by | Owner | First place to look |
|---|---|---|---|
| 403 before any object exists | the API server authorizer | namespace owner | the Role and the binding's subject |
| 403 naming a policy | Pod Security admission | namespace owner | the namespace label and the pod spec |
| 403 naming a quota | the quota admission plugin | namespace owner | the hard map and current usage |
| Timeout with no server log | the CNI at the pod interface | platform team | the policy's selector, direction and port |
| 404 with a clean log | the application | service team | the id, not the infrastructure |
Readiness is a data-plane claim, so it has to touch the data. The health route proves the process is up; the ready route writes and removes a sentinel on the claim. Without that write, a full disk and a detached volume both look like a healthy pod.
Rollout is proven by the claim, not by the revision. Change the image digest input, apply, and watch the controller replace its single pod. The new revision proves the spec changed; reading the entry written before the rollout proves the volume followed it.
Telemetry is four sources with four owners. The response body belongs to the application, the container log to the service team, the pod's conditions and events to the kubelet, and the plan to the platform. A cluster-wide log pipeline is a cluster-scoped service; name its owner in D2 rather than assuming it exists.
Every negative case names its control. A timeout records the policy and the direction, a 403 records the plugin, and a 404 records the application. A denial attributed to the wrong control passes the status check and fails the design.
Figure 6 places the six outcomes on one path and shows which layer answers each one.
Run the matrix twice. The first run proves behaviour; the second, after a no-change plan in both roots, proves nothing moved underneath the passing result. A case that passes only on the first run is a timing dependency wearing a green tick.
Figure 7 turns the matrix into the evidence flow, including the branch where a passing test produces nothing a reviewer can use.
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','titleColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','signalColor':'#5a6e82','noteBkgColor':'#c4873b','noteTextColor':'#132440','fontFamily':'DM Sans, sans-serif'}}}%%
flowchart TD
B["Baseline
one allowed write, one denied request"] --> P["Positive cases
append, read, restart the pod"]
P --> N["Negative cases
namespace, RBAC, PSA, quota, unknown id"]
N --> T{"Does the evidence name
the deciding layer?"}
T -->|"no"| X1["Re-run
record the source, not the status"]
T -->|"yes"| E["Evidence table
one row per case"]
E --> G{"Any case red?"}
G -->|"yes"| X2["Stop
no promotion"]
G -->|"no"| R["Rollout by digest
the earlier entry still reads"]
R --> OK["Acceptance signed
D5 complete"]
P -.->|"the pod was never deleted"| X3["Restart never proven
identity and data untested"]
N -.->|"timeout blamed on the app"| X4["Wrong control fixed
the boundary stays open"]
classDef primary fill:#132440,color:#ffffff,stroke:#0b172b;
classDef secondary fill:#16476A,color:#ffffff,stroke:#0f314a;
classDef ok fill:#3B9797,color:#ffffff,stroke:#2a6f6f;
classDef danger fill:#BF092F,color:#ffffff,stroke:#7a0420;
classDef warn fill:#c4873b,color:#132440,stroke:#8a5a1f;
class B,P,N,R primary;
class E secondary;
class T,G warn;
class OK ok;
class X1,X2,X3,X4 danger;
A passing matrix is not a promoted service. Acceptance closes when the matrix, the promotion record and the two no-change plans exist together, because each one covers a different failure: behaviour, provenance and drift.
Recover a Controlled Failure and Submit the Evidence
Choose one failure that no plan can see. Fill the claim: append one entry larger than the space that remains, from the client pod. Nothing in either root changes, the architecture is intact, and the next write fails inside the container while the volume is still Bound.
| Layer | Before the append | After the append | Terraform view |
|---|---|---|---|
| Write | 201 with a new id | 500 with no space left on device | no change |
| Readiness | Ready true | Ready false after the sentinel write fails | no change |
| Service endpoints | one endpoint | none, so the client cannot reach it | no change |
| Pod | Running and Ready | Running, not Ready | no change |
| Workload root plan | no changes | no changes | the failure is not configuration |
| Platform root plan | no changes | no changes | the boundary held |
| Volume | Bound, space available | Bound, no space left | not in state at all |
State the hypothesis before you touch anything. Expected: a write failure reporting no space left on device, readiness flipping to false, the Service losing its only endpoint, and both plans clean. A hypothesis that cannot be wrong is not a test, it is a description.
Inject through the data path, not through a commit. A commit would make the change legitimate and hide it from the plan for the wrong reason. An append is usage, so the plans stay clean by design, and the timeline starts at the moment of the append.
Recovery is a data decision followed by a verification. Write the options down, choose one, and record the ones you did not take.
| Option | Right when | Chosen here |
|---|---|---|
| Delete the oversized entry | one bad record, volume otherwise healthy | yes, one file removed |
| Grow the claim | the dataset is legitimate and the class allows expansion | no, recorded as the untested path |
| Restore a snapshot | the disk is corrupt or the data is unrecoverable | no, no snapshot exists in this design |
| Rebuild the volume | the volume itself is unusable | rejected, it destroys the evidence |
Expansion is a one-way ratchet, which is why it is the second choice. Kubernetes cannot shrink a claim, so growing the volume during an incident spends capacity permanently to fix one record. The class also has expansion off in this project, so the honest answer is that the option is a reviewed change with its own plan, not a rescue.
Recovery is verified by four sources, not by the absence of an error. The write returns 201, readiness returns 200, the Service has an endpoint again, and both roots still plan no change. Record the first success timestamp next to the failure timestamp, because the pair is the evidence.
Cleanup is an ordered inventory with a named owner. Each row has an owner and a verification, because "destroy everything" is not a step anyone can check.
| Order | Object | Owner | Verified by |
|---|---|---|---|
| 1 | Verifier identity and test callers | workload | the old credential is refused |
| 2 | StatefulSet, Service, ConfigMap | workload | apply of the destroy plan, zero to add |
| 3 | Evidence archived | workload | readable after the namespace is gone |
| 4 | Policy, quota, limit range, roles | workload | the namespace describes none of them |
| 5 | Claim deleted deliberately | data | the PV moves to Released |
| 6 | Retained PV and disk | data | the cloud volume list shows none for this project |
| 7 | StorageClass | platform | the class list no longer shows it |
| 8 | Namespace | platform | the namespace list no longer shows it |
| 9 | State keys and lock files | platform | the backend lists no key for the destroyed roots |
Step five is the decision, and step eight is the cascade. Deleting the namespace before the data decision removes the claim without a recorded reason, and the Retain volume then outlives every owner who knew what it was for.
Recover a Controlled Failure and Submit the Evidence
Status: design-only. No cluster was created or modified to produce this capstone, and these steps were not executed here. Versions: Terraform CLI 1.17.1, hashicorp/kubernetes 3.5.0, verified 6 November 2026.
Prerequisites. A namespace you may write to, a CNI that documents and enforces NetworkPolicy in both directions, a CSI driver with a StorageClass you may reference, a registry the nodes can pull from, and a small client image with a shell and an HTTP client. Confirm that the Pod Security level on the namespace is the one you intend, because a restricted namespace refuses the privileged case with a policy message rather than a quota one.
Deliverables to attach. D1 scope and cost record, D2 ownership matrix, D3 two applied roots, D4 promotion record, D5 acceptance matrix, D6 failure and cleanup report. The review is not complete until every acceptance row has an artifact behind it.
| Stage | Action | Pass condition |
|---|---|---|
| Preflight | plan the platform and workload roots, save both plans | both plan, digests recorded, no unexpected destroys |
| Apply | platform, then workload | two applies, no console edit, one pod Ready |
| Positive | write, read, health, readiness, pod restart | 201, 200, 200, 200, the entry survives |
| Negative | other namespace, verifier write, privileged pod, over-quota pod, unknown id | timeout, 403, 403, 403, 404 |
| Telemetry | read the container log and the pod events | the denial appears once, in the right source |
| Promotion | approve plan digest and image digest together | one apply of the saved plan |
| Failure | append one oversized entry | 500, Ready false, no endpoint, both plans clean |
| Recovery | remove the entry, repeat the cases | 201, Ready true, endpoint back |
| Reconcile | plan both roots with the detailed exit code | exit 0 twice |
| Teardown | follow the cleanup inventory in order | every row verified, no orphan volume |
- Record the baseline. Apply the namespace and the class, then the namespaced objects; save both plan digests and confirm one pod is Ready with one Bound claim. Do not continue until the baseline is boring.
- Prove the allowed path. Append one entry from the client pod, read it back by id, and call the health and ready routes. Expect 201, 200, 200, 200, and record the entry id and the file's size.
- Prove persistence across a restart. Delete the pod and wait for the controller to replace it, then read the same id again. Expect the same body and a new pod name, which proves the volume followed the ordinal rather than the container.
- Prove the denied path. Repeat the read from a pod in the second namespace where no allow rule names it. Expect a deadline exceeded rather than an HTTP error, because a packet filter has no status to return.
- Prove the identity boundary. Attempt a pod create as the verifier identity and read the error. Expect 403 from the authorizer, with no object created and no admission message.
- Prove admission. Apply a privileged container into the namespace and expect 403 naming restricted. Then request more CPU than the quota has left and expect 403 naming exceeded quota with used and hard in the message.
- Read the telemetry. Confirm the denial appears in the container log only where it should, and that the pod events name the probe failure when readiness flips. A denial with no matching source is a finding.
- Promote. Approve the plan digest and the image digest, apply the saved plan, and confirm the StatefulSet reports the approved digest. Record both digests in D4 before the apply and the result after it.
- Announce the failure window. Name the expected signal, the recovery owner and the data decision in advance. The window is short, and the announcement is what makes the later timeline credible.
- Inject. Append an entry larger than the free space, record the time, and stop writing. Expect the write to fail with no space left on device, readiness to flip, and the Service to lose its endpoint.
- Observe, then decide. Read the pod conditions, the events and both plans, then choose the data option from the table above. Removing the oversized entry is the chosen repair; expansion stays recorded and untested.
- Recover and reconcile. Remove the entry, repeat the write, read and readiness cases, and record the first success. Plan both roots with the detailed exit code and expect 0 from each.
- Teardown in order. Archive the evidence, delete the workload objects, delete the claim deliberately, confirm the PV is Released, then delete the retained PV and its disk in the cloud console, and finish with an inventory that returns nothing.
Expected observation. The client reaches the service in its own namespace and times out in the other, the entry survives a pod replacement, the verifier identity is refused before an object exists, and the injected append produces a write failure with both plans clean. Removal of one file restores the write, readiness and the endpoint, and the first success is timestamped after the failure.
Failure checks. The review fails if the timeout is "fixed" by widening a network policy without naming the control, if the 403 in step five carries an admission message instead of an authorization one, if the entry does not survive the restart, if either root shows a diff during the incident, if the injected failure is cleared by editing the claim in place, or if the destroyed namespace leaves a disk that no row in the inventory names.
Cost boundary. One namespace, one pod, one 1Gi claim, one ClusterIP Service and a handful of short-lived client and verifier pods. The real charges are the node hours behind the cluster and the disk while it exists; the ceiling is USD 15 for the 72-hour window, with stop rules that forbid a load balancer, a second cluster and a snapshot schedule. Confirm current pricing before the apply, and stop at the ceiling written in D1 rather than at the first surprising invoice.
Cleanup. Follow the nine-row inventory: credentials, workload objects, evidence, policies, claim, disk, class, namespace, state keys. The claim and the disk are the two rows that need a decision rather than a command, and the namespace is the row that must come after both.
Evidence to keep. Both plan digests, the promotion record with the image digest, the acceptance matrix with its evidence sources, the denial text and the request that produced it, the failure and recovery timestamps, the data decision with its rejected alternatives, the ownership matrix, the cleanup inventory, and the two final no-change plans. Keep the evidence; discard the credentials.
References (checked 6 November 2026): StatefulSets, network policies, persistent volumes, Pod Security Admission, service accounts, and the provider's StatefulSet, NetworkPolicy and StorageClass references.
An isolated workload is a set of owned surfaces with proof at each one. The project passes when a reviewer can name the owner of every object, replay the promotion from its two digests, read a negative case and see which control produced it, watch one data failure recover with both plans unmoved, and confirm that the teardown left nothing behind. That is a stronger result than a green apply, and it is the result this capstone asks you to deliver.