Kubernetes workload design
A Kubernetes Deployment manages replicated Pods for an application. A Service gives clients a stable endpoint, while readiness determines which endpoints normally receive traffic. Use matching Deployment selectors and Pod labels. Requests influence scheduling; limits constrain runtime consumption depending on resource and platform. Node heap size is only part of process memory; buffers, native allocations and threads also need room. Set startup, readiness and liveness probes based on observed behavior, and use a termination grace period longer than the application drain. A rolling deployment needs compatible old and new instances and database schema. A valid manifest is not evidence that the image starts, probes succeed, networking works or resources are adequate. Sources: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/, https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/, https://kubernetes.io/docs/concepts/workloads/controllers/deployment/.
Formal Syntax & Structure
Check selector and request model (conceptual contract; see example)Working Example
import assert from 'node:assert/strict';const selector={app:'catalog'},labels={app:'catalog',tier:'api'};assert.ok(Object.entries(selector).every(([k,v])=>labels[k]===v));console.log(3*250,'millicores requested');