t3-code-android-nightly/.repos/alchemy-effect/examples/kubernetes-tutorial
Julius Marminge 6f9cea00ae
chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 13:22:30 -07:00
..
src chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00
test chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00
alchemy.run.ts chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00
package.json chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00
README.md chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00
tsconfig.json chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170) 2026-10-05 13:22:30 -07:00

Kubernetes tutorial

The complete stack from the five-part Kubernetes tutorial: a local kind cluster with podinfo in its own namespace, an Effect smoke-test Job, the same program as a CronJob, and metrics-server from its Helm chart.

Requirements

Run

From the repository root, install dependencies with pnpm install. Then:

cd examples/kubernetes-tutorial
bun run deploy

The first deploy creates a kind cluster named alchemy (context kind-alchemy) with an image registry on localhost:5001, then builds and pushes the smoke test and health check.

kubectl --context kind-alchemy -n my-app get deployments,jobs,cronjobs
kubectl --context kind-alchemy -n my-app logs job/<smokeTest>
bun run destroy

--stage prod targets a kubeconfig context named prod and pushes to ghcr.io/you. Edit src/infra.ts for your cluster and registry first, as described in Part 5.

Test

timeout 400 bun test

The test deploys the stack to a fresh local cluster, waits for the smoke-test Job to complete, checks the Deployment, CronJob, and metrics-server, and destroys everything afterward. Set NO_DESTROY=1 to keep the cluster for inspection.