Base manifests for the three runtimes. No Helm yet — plain YAML first, so the
primitives are understood before they are abstracted away.
Scope
Notes
Resource requests are not a formality: they are what the scheduler uses for
bin-packing, and getting them wrong is the usual reason a cluster is both
expensive and slow. Set them from measured usage, not from a guess.
The migration Job ordering matters. Decide explicitly whether migrations run
before the new version starts, and what happens on rollback.
Definition of done
kubectl apply -k brings the whole stack up on a local kind or k3s cluster and
the smoke suite (smoke:stack:run) passes against it.
Base manifests for the three runtimes. No Helm yet — plain YAML first, so the
primitives are understood before they are abstracted away.
Scope
Deploymentforapi— replicas, resource requests/limits, probesDeploymentforworker— starts at 1 replica, autoscaled laterCronJoborDeploymentforscheduler— decide and write down why.A
CronJobgives Kubernetes-native scheduling but requires the schedulerto be idempotent and to stop owning its own timing loop
Service(ClusterIP) forapiConfigMapfor non-secret configurationSecretfor database URL, Redis URL and API keys — never baked into the imageJobfornpm run migrate, run as a pre-deploy stepsecurityContext: non-root user, read-only root filesystem, dropped capabilitiesPodDisruptionBudgetforapiNotes
Resource requests are not a formality: they are what the scheduler uses for
bin-packing, and getting them wrong is the usual reason a cluster is both
expensive and slow. Set them from measured usage, not from a guess.
The migration
Jobordering matters. Decide explicitly whether migrations runbefore the new version starts, and what happens on rollback.
Definition of done
kubectl apply -kbrings the whole stack up on a local kind or k3s cluster andthe smoke suite (
smoke:stack:run) passes against it.