Kubernetes Workload Planning
Project workbook · Path 85

Draft a small Deployment and Service manifest, explain selector matching and plan readiness and rollback checks.

The case

A fictional static workshop site needs two replicas. Pods carry label app: workshop, the Service selects that label and maps port 80 to container port 8080. The image name is a placeholder until the learner supplies a verified local or approved image.

SettingValue
Replicas2
Pod labelapp: workshop
Service selectorapp: workshop
Service port80
Container port8080
STAGE 1

Map the workload objects

A Deployment manages a desired set of pods; a Service selects matching pods to provide a stable access point. Distinguish the controller, its pod template and the Service. A manifest describes desired state, but actual behavior requires a cluster and a compatible image. This package prepares the design without provisioning infrastructure.

Your task

Draw the Deployment–Pods–Service relationship.

Required output

Workload map

Record your result and evidence here or in a separate file.

Review gate

The Service selects pod labels rather than the Deployment name alone.

If the gate is not met

Compare the selector with the pod template labels.

STAGE 2

Write a consistent manifest

Keep selector labels consistent and declare container and target ports deliberately. A mismatched target port can make an apparently running pod unreachable through the Service. Avoid embedding credentials or public load-balancer settings in a learning fixture. Use a placeholder image that must be replaced before execution.

Your task

Write the Deployment and ClusterIP Service YAML.

Required output

Manifest draft

Record your result and evidence here or in a separate file.

Review gate

Replicas=2 and selector labels match exactly.

If the gate is not met

Compare keys and values character by character.

STAGE 3

Plan health and resources

Readiness determines whether a pod should receive traffic; liveness concerns restarting an unhealthy container. Probes must match the actual application and should not be copied blindly. Resource requests and limits also need workload evidence. The design should label unverified probe paths and sizing assumptions.

Your task

Add a readiness proposal and resource-assumption table.

Required output

Operational assumptions

Record your result and evidence here or in a separate file.

Review gate

No untested probe is described as verified against the placeholder image.

If the gate is not met

Connect each probe to an actual application behavior to test later.

STAGE 4

Design rollout checks

A rollout check should inspect readiness, endpoints and the served response, not only the presence of a Deployment object. Define a rollback trigger and preserve the previous known-good image reference. This exercise does not execute kubectl or a container engine in the preparation environment.

Your task

Write local-cluster validation and rollback commands as a runbook.

Required output

Execution checklist

Record your result and evidence here or in a separate file.

Review gate

Commands are labeled planned, with spaces for actual results.

If the gate is not met

Do not turn expected output into a fabricated cluster log.

STAGE 5

Review the design boundary

A design review can catch inconsistent labels and ports but cannot prove runtime reachability. Record which checks were static and which need an engine. Avoid exposing the learning Service publicly by default. The final handoff should let a learner run the case in a controlled local cluster when available.

Your task

Complete the manifest review and unresolved-assumption list.

Required output

Workload handoff

Record your result and evidence here or in a separate file.

Review gate

Static review and unperformed runtime checks are clearly distinguished.

If the gate is not met

Keep the placeholder-image blocker visible.

Final project

Deliver the object map, manifests, health assumptions and rollout/rollback checklist. Deliberately change one selector in a copy and show how the review detects the broken relationship.

Critical condition

No placeholder image is presented as deployable or a static manifest as a running workload.

CriterionPointsEvidence
Evidence and correctness30Calculations, source use and results match the supplied case; limitations are honest.
Required artifacts30All five stage outputs and the capstone handoff are present and inspectable.
Reasoning and decisions20Choices, assumptions, alternatives and the case-specific critical condition are explained.
Reproducibility10A reviewer can follow the stated steps and distinguish expected from observed results.
Clear communication10Labels, units, structure and evidence references make the work easy to review.

Score at least 80/100, supply every required artifact, and satisfy the path-specific critical condition. Rework missing evidence before marking complete.

Worked reference

The Service selector app=workshop matches the pod-template label. Port 80 forwards to targetPort 8080, which must match the actual application listener. Two replicas are desired, not claimed running. Kubernetes and container-engine execution were not performed here.

Boundaries

This is a reviewed workload design, not a cluster deployment, security hardening review or capacity benchmark.