Kubernetes Fundamentals
This chapter derives core workload, networking, configuration, rollout, health, and debugging behavior from Kubernetes' reconciliation model.
- Explain Core workload objects by naming its input, guarantee, internal lifecycle, important failure, and proof.
- Explain Services, ConfigMaps & Secrets by naming its input, guarantee, internal lifecycle, important failure, and proof.
- Explain kubectl essentials by naming its input, guarantee, internal lifecycle, important failure, and proof.
- Explain Namespaces & policy by naming its input, guarantee, internal lifecycle, important failure, and proof.
- Trace the chapter's complete execution path and identify where memory, I/O, concurrency, persistence, or rendering cost accumulates.
How to use this chapter
For Kubernetes Fundamentals, read the explanations first and predict every example before running it. Keep a learning repository containing code, tests, command output, and the short written submission. The roadmap checklist at the end audits coverage; the chapter itself follows the operations learning arc appropriate to this subject.
The problem this chapter solves
This chapter derives core workload, networking, configuration, rollout, health, and debugging behavior from Kubernetes' reconciliation model.
Automation reduces configuration drift and makes deployments, rollbacks, capacity, permissions, and incident response reproducible.
Learning outcomes
- Explain Core workload objects by naming its input, guarantee, internal lifecycle, important failure, and proof.
- Explain Services, ConfigMaps & Secrets by naming its input, guarantee, internal lifecycle, important failure, and proof.
- Explain kubectl essentials by naming its input, guarantee, internal lifecycle, important failure, and proof.
- Explain Namespaces & policy by naming its input, guarantee, internal lifecycle, important failure, and proof.
- Trace the chapter's complete execution path and identify where memory, I/O, concurrency, persistence, or rendering cost accumulates.
- Build the worked example, make one failure visible, and defend the design in a review.
Chapter progression
The order below is intentional: later sections depend on guarantees established earlier.
Runtime or system overview
A container is an isolated process using kernel namespaces and cgroups, not a virtual machine. Kubernetes controllers continuously compare desired and observed state. CI runners execute an immutable workflow revision. Observability correlates metrics, logs, and traces across those layers. In Kubernetes Fundamentals, use that execution model to decide where the chapter's validation, state ownership, cleanup, and evidence belong.
Execution trace
- A versioned manifest or workflow is parsed and validated, and authentication plus authorization determines which control-plane operations are allowed.
- The platform records desired state; controllers, runners, or cloud services reconcile it by creating artifacts, workloads, routes, identities, and telemetry pipelines.
- Readiness and health gates control traffic while resource requests, limits, quotas, pools, and autoscaling signals bound capacity.
- A failed rollout, hook, job, or health condition follows the documented retry, pause, rollback, or incident path without changing immutable artifact identity.
- Deployment verification checks the user path, version/digest, metrics, logs, traces, alerts, permissions, and recovery procedure rather than only command exit status.
Memory and performance lens
Resource requests drive scheduling; limits constrain cgroups and may trigger throttling or OOM termination. Build layers, image caches, log buffers, telemetry cardinality, and unbounded queues consume storage or memory even when application code appears stable. For Kubernetes Fundamentals, connect those costs to the concrete operations in the topic sections rather than assuming the friendly surface syntax is cheap.
When tuning Kubernetes Fundamentals, measure build duration, artifact size, rollout health, CPU/memory saturation, restart/OOM rate, telemetry cardinality, and rollback time rather than optimizing from source-code appearance.
1. Core workload objects
The Core workload objects unit begins with Pod: spec/containers/resources/liveness+readiness probes: Kubernetes workload objects declare pod templates and lifecycle guarantees; controllers create or replace Pods until observed state matches the specification. Set requests, graceful termination, conservative probes, and disruption-aware rollouts. The rest of this section connects that guarantee to this unit's related roadmap concepts instead of treating each term as an isolated flashcard.
Desired state and operational contract: Core workload objects
| Concept | Meaning | Engineering decision |
|---|---|---|
| Pod: spec/containers/resources/liveness+readiness probes | Kubernetes workload objects declare pod templates and lifecycle guarantees; controllers create or replace Pods until observed state matches the specification. | Set requests, graceful termination, conservative probes, and disruption-aware rollouts. |
| Deployment: replicas/RollingUpdate/revisionHistoryLimit | Kubernetes workload objects declare pod templates and lifecycle guarantees; controllers create or replace Pods until observed state matches the specification. | Set requests, graceful termination, conservative probes, and disruption-aware rollouts. |
| DaemonSet: one pod per node | Kubernetes workload objects declare pod templates and lifecycle guarantees; controllers create or replace Pods until observed state matches the specification. | Set requests, graceful termination, conservative probes, and disruption-aware rollouts. |
| StatefulSet: ordered deployment/stable network identity | Kubernetes workload objects declare pod templates and lifecycle guarantees; controllers create or replace Pods until observed state matches the specification. | Set requests, graceful termination, conservative probes, and disruption-aware rollouts. |
What the platform reconciles: Core workload objects
Pod: spec/containers/resources/liveness+readiness probes. Deployments manage ReplicaSets and rolling updates; DaemonSets target nodes; StatefulSets provide ordered identities and volume claims. Readiness gates traffic; liveness restarts a stuck container.
Deployment: replicas/RollingUpdate/revisionHistoryLimit. Deployments manage ReplicaSets and rolling updates; DaemonSets target nodes; StatefulSets provide ordered identities and volume claims. Readiness gates traffic; liveness restarts a stuck container.
DaemonSet: one pod per node. Deployments manage ReplicaSets and rolling updates; DaemonSets target nodes; StatefulSets provide ordered identities and volume claims. Readiness gates traffic; liveness restarts a stuck container.
StatefulSet: ordered deployment/stable network identity. Deployments manage ReplicaSets and rolling updates; DaemonSets target nodes; StatefulSets provide ordered identities and volume claims. Readiness gates traffic; liveness restarts a stuck container.
Read these as one system: Pod: spec/containers/resources/liveness+readiness probes establishes the starting contract, Deployment: replicas/RollingUpdate/revisionHistoryLimit changes how that contract is executed or represented, and StatefulSet: ordered deployment/stable network identity exposes a later boundary or failure condition. A local optimization is useful only when the combined behavior stays correct and observable.
Configuration with an observable result: Core workload objects
1apiVersion: apps/v12kind: Deployment3spec:4 replicas: 35 template:6 spec:7 containers: []This Core workload objects slice makes Pod: spec/containers/resources/liveness+readiness probes observable. Read it from the boundary inward: identify the input, the validation point, the state or operation, and the value that proves the result. Before extending it toward StatefulSet: ordered deployment/stable network identity, predict its behavior for empty, invalid, repeated, and large input.
Failure and security boundaries: Core workload objects
| Risk | Why it matters |
|---|---|
| Pod: spec/containers/resources/liveness+readiness probes | A liveness probe that depends on a downstream database can restart every healthy pod during a database outage. |
| Deployment: replicas/RollingUpdate/revisionHistoryLimit | A liveness probe that depends on a downstream database can restart every healthy pod during a database outage. |
| DaemonSet: one pod per node | A liveness probe that depends on a downstream database can restart every healthy pod during a database outage. |
| StatefulSet: ordered deployment/stable network identity | A liveness probe that depends on a downstream database can restart every healthy pod during a database outage. |
Operations drill: Core workload objects
- Foundation: implement or demonstrate Pod: spec/containers/resources/liveness+readiness probes with one valid input and one invalid input. Record the exact output or failure.
- Integration: combine Pod: spec/containers/resources/liveness+readiness probes with Deployment: replicas/RollingUpdate/revisionHistoryLimit. Explain which component owns validation and cleanup.
- Production: design a test or experiment that exposes the failure described for StatefulSet: ordered deployment/stable network identity. State the metric, assertion, or query plan that proves the correction.
What a strong checkpoint answer contains
- A precise boundary and typed or validated input.
- One named guarantee, not only a library call.
- A negative case that fails for the intended reason.
- Cleanup, transaction, retry, or cancellation behavior where applicable.
- Evidence: assertion, command output, plan, trace, metric, or accessible UI state.
2. Services, ConfigMaps & Secrets
The Services, ConfigMaps & Secrets unit begins with ClusterIP/NodePort/LoadBalancer/ExternalName: Services provide stable virtual addressing over changing Pods; ConfigMaps and Secrets inject environment-independent configuration. Use workload identity or external secret synchronization and trigger safe rollouts on config changes. The rest of this section connects that guarantee to this unit's related roadmap concepts instead of treating each term as an isolated flashcard.
Desired state and operational contract: Services, ConfigMaps & Secrets
| Concept | Meaning | Engineering decision |
|---|---|---|
| ClusterIP/NodePort/LoadBalancer/ExternalName | Services provide stable virtual addressing over changing Pods; ConfigMaps and Secrets inject environment-independent configuration. | Use workload identity or external secret synchronization and trigger safe rollouts on config changes. |
| DNS: service.namespace.svc.cluster.local | Services provide stable virtual addressing over changing Pods; ConfigMaps and Secrets inject environment-independent configuration. | Use workload identity or external secret synchronization and trigger safe rollouts on config changes. |
| ConfigMap: env/envFrom/volume mounting | Services provide stable virtual addressing over changing Pods; ConfigMaps and Secrets inject environment-independent configuration. | Use workload identity or external secret synchronization and trigger safe rollouts on config changes. |
| Secret types: Opaque/TLS | Services provide stable virtual addressing over changing Pods; ConfigMaps and Secrets inject environment-independent configuration. | Use workload identity or external secret synchronization and trigger safe rollouts on config changes. |
| Sealed Secrets + External Secrets Operator | Services provide stable virtual addressing over changing Pods; ConfigMaps and Secrets inject environment-independent configuration. | Use workload identity or external secret synchronization and trigger safe rollouts on config changes. |
What the platform reconciles: Services, ConfigMaps & Secrets
ClusterIP/NodePort/LoadBalancer/ExternalName. EndpointSlices track ready backends and kube-proxy or dataplane rules route traffic. Secret values are encoded, not necessarily encrypted, unless cluster storage encryption is configured.
DNS: service.namespace.svc.cluster.local. EndpointSlices track ready backends and kube-proxy or dataplane rules route traffic. Secret values are encoded, not necessarily encrypted, unless cluster storage encryption is configured.
ConfigMap: env/envFrom/volume mounting. EndpointSlices track ready backends and kube-proxy or dataplane rules route traffic. Secret values are encoded, not necessarily encrypted, unless cluster storage encryption is configured.
Secret types: Opaque/TLS. EndpointSlices track ready backends and kube-proxy or dataplane rules route traffic. Secret values are encoded, not necessarily encrypted, unless cluster storage encryption is configured.
Sealed Secrets + External Secrets Operator. EndpointSlices track ready backends and kube-proxy or dataplane rules route traffic. Secret values are encoded, not necessarily encrypted, unless cluster storage encryption is configured.
Read these as one system: ClusterIP/NodePort/LoadBalancer/ExternalName establishes the starting contract, DNS: service.namespace.svc.cluster.local changes how that contract is executed or represented, and Sealed Secrets + External Secrets Operator exposes a later boundary or failure condition. A local optimization is useful only when the combined behavior stays correct and observable.
Failure and security boundaries: Services, ConfigMaps & Secrets
| Risk | Why it matters |
|---|---|
| ClusterIP/NodePort/LoadBalancer/ExternalName | Environment variables do not update in running processes and base64 is not encryption. |
| DNS: service.namespace.svc.cluster.local | Environment variables do not update in running processes and base64 is not encryption. |
| ConfigMap: env/envFrom/volume mounting | Environment variables do not update in running processes and base64 is not encryption. |
| Secret types: Opaque/TLS | Environment variables do not update in running processes and base64 is not encryption. |
| Sealed Secrets + External Secrets Operator | Environment variables do not update in running processes and base64 is not encryption. |
Operations drill: Services, ConfigMaps & Secrets
- Foundation: implement or demonstrate ClusterIP/NodePort/LoadBalancer/ExternalName with one valid input and one invalid input. Record the exact output or failure.
- Integration: combine ClusterIP/NodePort/LoadBalancer/ExternalName with DNS: service.namespace.svc.cluster.local. Explain which component owns validation and cleanup.
- Production: design a test or experiment that exposes the failure described for Sealed Secrets + External Secrets Operator. State the metric, assertion, or query plan that proves the correction.
What a strong checkpoint answer contains
- A precise boundary and typed or validated input.
- One named guarantee, not only a library call.
- A negative case that fails for the intended reason.
- Cleanup, transaction, retry, or cancellation behavior where applicable.
- Evidence: assertion, command output, plan, trace, metric, or accessible UI state.
3. kubectl essentials
The kubectl essentials unit begins with CRUD: apply/get/describe/delete/edit: kubectl submits declarative objects and exposes read-only and imperative debugging operations against the API server. Prefer committed manifests and use imperative commands for diagnosis. The rest of this section connects that guarantee to this unit's related roadmap concepts instead of treating each term as an isolated flashcard.
Desired state and operational contract: kubectl essentials
| Concept | Meaning | Engineering decision |
|---|---|---|
| CRUD: apply/get/describe/delete/edit | kubectl submits declarative objects and exposes read-only and imperative debugging operations against the API server. | Prefer committed manifests and use imperative commands for diagnosis. |
| Debugging: logs/exec/port-forward/cp | kubectl submits declarative objects and exposes read-only and imperative debugging operations against the API server. | Prefer committed manifests and use imperative commands for diagnosis. |
| Rolling updates: set image/rollout status/history/undo | kubectl submits declarative objects and exposes read-only and imperative debugging operations against the API server. | Prefer committed manifests and use imperative commands for diagnosis. |
| JSONPath queries in get output | kubectl submits declarative objects and exposes read-only and imperative debugging operations against the API server. | Prefer committed manifests and use imperative commands for diagnosis. |
What the platform reconciles: kubectl essentials
CRUD: apply/get/describe/delete/edit. Apply performs a patch based on field ownership; rollout history references controller revisions; logs and exec target a particular container and pod instance.
Debugging: logs/exec/port-forward/cp. Apply performs a patch based on field ownership; rollout history references controller revisions; logs and exec target a particular container and pod instance.
Rolling updates: set image/rollout status/history/undo. Apply performs a patch based on field ownership; rollout history references controller revisions; logs and exec target a particular container and pod instance.
JSONPath queries in get output. Apply performs a patch based on field ownership; rollout history references controller revisions; logs and exec target a particular container and pod instance.
Read these as one system: CRUD: apply/get/describe/delete/edit establishes the starting contract, Debugging: logs/exec/port-forward/cp changes how that contract is executed or represented, and JSONPath queries in get output exposes a later boundary or failure condition. A local optimization is useful only when the combined behavior stays correct and observable.
Failure and security boundaries: kubectl essentials
| Risk | Why it matters |
|---|---|
| CRUD: apply/get/describe/delete/edit | Manual edits drift from Git and disappear during reconciliation. |
| Debugging: logs/exec/port-forward/cp | Manual edits drift from Git and disappear during reconciliation. |
| Rolling updates: set image/rollout status/history/undo | Manual edits drift from Git and disappear during reconciliation. |
| JSONPath queries in get output | Manual edits drift from Git and disappear during reconciliation. |
Operations drill: kubectl essentials
- Foundation: implement or demonstrate CRUD: apply/get/describe/delete/edit with one valid input and one invalid input. Record the exact output or failure.
- Integration: combine CRUD: apply/get/describe/delete/edit with Debugging: logs/exec/port-forward/cp. Explain which component owns validation and cleanup.
- Production: design a test or experiment that exposes the failure described for JSONPath queries in get output. State the metric, assertion, or query plan that proves the correction.
What a strong checkpoint answer contains
- A precise boundary and typed or validated input.
- One named guarantee, not only a library call.
- A negative case that fails for the intended reason.
- Cleanup, transaction, retry, or cancellation behavior where applicable.
- Evidence: assertion, command output, plan, trace, metric, or accessible UI state.
4. Namespaces & policy
The Namespaces & policy unit begins with Namespace isolation limits: A Kubernetes Namespace scopes names and many policies/RBAC rules, but it is not by itself a strong security, network, resource, or node-isolation boundary. Use namespaces for ownership and policy grouping, then apply explicit least-privilege, network, quota, and pod-security controls per tenant risk. The rest of this section connects that guarantee to this unit's related roadmap concepts instead of treating each term as an isolated flashcard.
Desired state and operational contract: Namespaces & policy
| Concept | Meaning | Engineering decision |
|---|---|---|
| Namespace isolation limits | A Kubernetes Namespace scopes names and many policies/RBAC rules, but it is not by itself a strong security, network, resource, or node-isolation boundary. | Use namespaces for ownership and policy grouping, then apply explicit least-privilege, network, quota, and pod-security controls per tenant risk. |
| ResourceQuota aggregate caps | Namespaces group namespaced resources; ResourceQuota caps aggregate consumption, LimitRange supplies/defaults per-object bounds, and NetworkPolicy restricts pod traffic when the network plugin enforces it. | Apply default-deny then add DNS and required service paths, and verify policy in a real cluster/CNI. |
| LimitRange defaults and bounds | Namespaces group namespaced resources; ResourceQuota caps aggregate consumption, LimitRange supplies/defaults per-object bounds, and NetworkPolicy restricts pod traffic when the network plugin enforces it. | Apply default-deny then add DNS and required service paths, and verify policy in a real cluster/CNI. |
| default-deny NetworkPolicy plus explicit ingress/egress | Namespaces group namespaced resources; ResourceQuota caps aggregate consumption, LimitRange supplies/defaults per-object bounds, and NetworkPolicy restricts pod traffic when the network plugin enforces it. | Apply default-deny then add DNS and required service paths, and verify policy in a real cluster/CNI. |
| kubectl explain recursive schema inspection | Namespaces group namespaced resources; ResourceQuota caps aggregate consumption, LimitRange supplies/defaults per-object bounds, and NetworkPolicy restricts pod traffic when the network plugin enforces it. | Apply default-deny then add DNS and required service paths, and verify policy in a real cluster/CNI. |
What the platform reconciles: Namespaces & policy
Namespace isolation limits. Namespaced API objects share cluster control plane and often nodes. ResourceQuota, LimitRange, NetworkPolicy, RBAC, admission policy, and workload identity add separate controls; some resources remain cluster-scoped.
ResourceQuota aggregate caps. Admission checks quota and limits before storing objects. NetworkPolicy selects pods and allowed peers/ports; once a pod is selected for a direction, only explicitly allowed traffic remains.
LimitRange defaults and bounds. Admission checks quota and limits before storing objects. NetworkPolicy selects pods and allowed peers/ports; once a pod is selected for a direction, only explicitly allowed traffic remains.
default-deny NetworkPolicy plus explicit ingress/egress. Admission checks quota and limits before storing objects. NetworkPolicy selects pods and allowed peers/ports; once a pod is selected for a direction, only explicitly allowed traffic remains.
kubectl explain recursive schema inspection. Admission checks quota and limits before storing objects. NetworkPolicy selects pods and allowed peers/ports; once a pod is selected for a direction, only explicitly allowed traffic remains.
Read these as one system: Namespace isolation limits establishes the starting contract, ResourceQuota aggregate caps changes how that contract is executed or represented, and kubectl explain recursive schema inspection exposes a later boundary or failure condition. A local optimization is useful only when the combined behavior stays correct and observable.
Failure and security boundaries: Namespaces & policy
| Risk | Why it matters |
|---|---|
| Namespace isolation limits | Assuming a namespace blocks network traffic or privileged workloads allows cross-namespace access through shared cluster facilities. |
| ResourceQuota aggregate caps | Namespaces alone are not a security boundary, and NetworkPolicy without an enforcing CNI changes nothing. |
| LimitRange defaults and bounds | Namespaces alone are not a security boundary, and NetworkPolicy without an enforcing CNI changes nothing. |
| default-deny NetworkPolicy plus explicit ingress/egress | Namespaces alone are not a security boundary, and NetworkPolicy without an enforcing CNI changes nothing. |
| kubectl explain recursive schema inspection | Namespaces alone are not a security boundary, and NetworkPolicy without an enforcing CNI changes nothing. |
Operations drill: Namespaces & policy
- Foundation: implement or demonstrate Namespace isolation limits with one valid input and one invalid input. Record the exact output or failure.
- Integration: combine Namespace isolation limits with ResourceQuota aggregate caps. Explain which component owns validation and cleanup.
- Production: design a test or experiment that exposes the failure described for kubectl explain recursive schema inspection. State the metric, assertion, or query plan that proves the correction.
What a strong checkpoint answer contains
- A precise boundary and typed or validated input.
- One named guarantee, not only a library call.
- A negative case that fails for the intended reason.
- Cleanup, transaction, retry, or cancellation behavior where applicable.
- Evidence: assertion, command output, plan, trace, metric, or accessible UI state.
Complete worked example
This example integrates the chapter rather than demonstrating an isolated method.
1apiVersion: apps/v12kind: Deployment3metadata: {name: url-api}4spec:5 replicas: 36 strategy: {type: RollingUpdate, rollingUpdate: {maxUnavailable: 0, maxSurge: 1}}7 selector: {matchLabels: {app: url-api}}8 template:9 metadata: {labels: {app: url-api}}10 spec:11 terminationGracePeriodSeconds: 3012 containers:13 - name: api14 image: registry.example/url-api@sha256:immutable15 ports: [{containerPort: 8000}]16 resources:17 requests: {cpu: 100m, memory: 128Mi}18 limits: {cpu: 500m, memory: 256Mi}19 readinessProbe: {httpGet: {path: /ready, port: 8000}, periodSeconds: 5}20 livenessProbe: {httpGet: {path: /health, port: 8000}, periodSeconds: 10}Expected result
1The controller maintains three ready replicas and performs a zero-unavailable rolling update.Line-by-line reading
| Line | Code | Explanation |
|---|---|---|
| 1 | apiVersion: apps/v1 | Declares one level of a desired-state or automation document. |
| 2 | kind: Deployment | Declares one level of a desired-state or automation document. |
| 3 | metadata: {name: url-api} | Declares one level of a desired-state or automation document. |
| 4 | spec: | Declares one level of a desired-state or automation document. |
| 5 | replicas: 3 | Implements the next yaml statement in the example's data flow. |
| 6 | strategy: {type: RollingUpdate, rollingUpdate: {maxUnavailable: 0, maxSurge: 1}} | Implements the next yaml statement in the example's data flow. |
| 7 | selector: {matchLabels: {app: url-api}} | Begins a declarative database or protocol operation; subsequent lines refine its contract. |
| 8 | template: | Implements the next yaml statement in the example's data flow. |
| 9 | metadata: {labels: {app: url-api}} | Declares one level of a desired-state or automation document. |
| 10 | spec: | Declares one level of a desired-state or automation document. |
| 11 | terminationGracePeriodSeconds: 30 | Implements the next yaml statement in the example's data flow. |
| 12 | containers: | Implements the next yaml statement in the example's data flow. |
| 13 | - name: api | Implements the next yaml statement in the example's data flow. |
| 14 | image: registry.example/url-api@sha256:immutable | Implements the next yaml statement in the example's data flow. |
| 15 | ports: [{containerPort: 8000}] | Implements the next yaml statement in the example's data flow. |
| 16 | resources: | Implements the next yaml statement in the example's data flow. |
| 17 | requests: {cpu: 100m, memory: 128Mi} | Implements the next yaml statement in the example's data flow. |
| 18 | limits: {cpu: 500m, memory: 256Mi} | Adds a relational selection, combination, ordering, bound, or returned-value rule to the statement. |
| 19 | readinessProbe: {httpGet: {path: /ready, port: 8000}, periodSeconds: 5} | Implements the next yaml statement in the example's data flow. |
| 20 | livenessProbe: {httpGet: {path: /health, port: 8000}, periodSeconds: 10} | Implements the next yaml statement in the example's data flow. |
Step-by-step execution
- A versioned manifest or workflow is parsed and validated, and authentication plus authorization determines which control-plane operations are allowed.
- The platform records desired state; controllers, runners, or cloud services reconcile it by creating artifacts, workloads, routes, identities, and telemetry pipelines.
- Readiness and health gates control traffic while resource requests, limits, quotas, pools, and autoscaling signals bound capacity.
- A failed rollout, hook, job, or health condition follows the documented retry, pause, rollback, or incident path without changing immutable artifact identity.
- Deployment verification checks the user path, version/digest, metrics, logs, traces, alerts, permissions, and recovery procedure rather than only command exit status.
Common mistakes and professional corrections
| Area | Common failure | Better engineering choice |
|---|---|---|
| Core workload objects | A liveness probe that depends on a downstream database can restart every healthy pod during a database outage. | Set requests, graceful termination, conservative probes, and disruption-aware rollouts. |
| Services, ConfigMaps & Secrets | Environment variables do not update in running processes and base64 is not encryption. | Use workload identity or external secret synchronization and trigger safe rollouts on config changes. |
| kubectl essentials | Manual edits drift from Git and disappear during reconciliation. | Prefer committed manifests and use imperative commands for diagnosis. |
| Namespaces & policy | Assuming a namespace blocks network traffic or privileged workloads allows cross-namespace access through shared cluster facilities. | Use namespaces for ownership and policy grouping, then apply explicit least-privilege, network, quota, and pod-security controls per tenant risk. |
Interview and review notes
- Define the central abstraction without naming a library function.
- Trace one request, call, query, message, render, or state transition from input to observable result.
- Compare two alternatives from this chapter by guarantee, cost, and failure behavior.
- Explain the most likely production bug and the test or metric that reveals it.
- State what remains authoritative after process loss, retry, reconnect, or deployment.
Practice set
Easy
- Define every bold term in the concept tables in one precise sentence.
- Reproduce the focused examples and annotate the value or state after each important line.
- Explain the chapter progression diagram aloud in two minutes.
Medium
- Replace one convenient default with an explicit policy for validation, timeout, ordering, pagination, cleanup, or error handling.
- Write a negative test for each topic group.
- Compare the measured behavior before and after one justified change.
Hard
- Combine all topic groups into one thin vertical slice.
- Inject a realistic failure at the most important external boundary and prove recovery.
- Write a one-page design note covering ownership, trade-offs, security, observability, and rollback.
Chapter submission
Submit:
- source code or reproducible commands;
- automated tests plus one deliberately failing-before-fix test;
- captured output, query plan, trace, screenshot, or metric;
- a 300–500 word explanation of the execution flow and one rejected alternative;
- a short README with setup, versions, limitations, and cleanup steps.
- Continue with the FastAPI on Kubernetes project workshop.
Self-review rubric
| Dimension | Beginning | Competent | Professional |
|---|---|---|---|
| Explanation | Names APIs | Explains behavior | Connects guarantees, internals, and trade-offs |
| Implementation | Happy path only | Validated and tested | Clear ownership, failure recovery, and cleanup |
| Evidence | Manual claim | Repeatable output | Tests plus meaningful measurement or inspection |
| Communication | Steps missing | Reproducible README | Decisions, limits, and alternatives are explicit |
Roadmap coverage checklist
- To do: Core workload objects: Pod: spec/containers/resources/liveness+readiness probes
- To do: Core workload objects: Deployment: replicas/RollingUpdate/revisionHistoryLimit
- To do: Core workload objects: DaemonSet: one pod per node
- To do: Core workload objects: StatefulSet: ordered deployment/stable network identity
- To do: Services, ConfigMaps & Secrets: ClusterIP/NodePort/LoadBalancer/ExternalName
- To do: Services, ConfigMaps & Secrets: DNS: service.namespace.svc.cluster.local
- To do: Services, ConfigMaps & Secrets: ConfigMap: env/envFrom/volume mounting
- To do: Services, ConfigMaps & Secrets: Secret types: Opaque/TLS
- To do: Services, ConfigMaps & Secrets: Sealed Secrets + External Secrets Operator
- To do: kubectl essentials: CRUD: apply/get/describe/delete/edit
- To do: kubectl essentials: Debugging: logs/exec/port-forward/cp
- To do: kubectl essentials: Rolling updates: set image/rollout status/history/undo
- To do: kubectl essentials: JSONPath queries in get output
- To do: Namespaces & policy: Namespace isolation limits
- To do: Namespaces & policy: ResourceQuota aggregate caps
- To do: Namespaces & policy: LimitRange defaults and bounds
- To do: Namespaces & policy: default-deny NetworkPolicy plus explicit ingress/egress
- To do: Namespaces & policy: kubectl explain recursive schema inspection
Quick revision
- Core workload objects: connect the surface API to its guarantee, lifecycle, failure boundary, and evidence.
- Services, ConfigMaps & Secrets: connect the surface API to its guarantee, lifecycle, failure boundary, and evidence.
- kubectl essentials: connect the surface API to its guarantee, lifecycle, failure boundary, and evidence.
- Namespaces & policy: connect the surface API to its guarantee, lifecycle, failure boundary, and evidence.
- Re-read the worked-example execution trace instead of memorizing isolated syntax.
- If you cannot name the owner of state and cleanup, the design is not yet complete.
Mastery check
How well can you recall this?
Finished this lesson?