@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 06:00 UTC

main
md 1.33 KB

@alchemy.run/kubernetes

Kubernetes for Alchemy. Declare Deployments, Jobs, raw manifests, and Helm charts on any cluster, in the same TypeScript program as the rest of your infrastructure. No YAML, no kubectl apply.

npm install alchemy @alchemy.run/kubernetes effect

A local cluster and a Deployment on it:

// alchemy.run.ts
import * as Alchemy from "alchemy";
import * as Kubernetes from "@alchemy.run/kubernetes";
import * as Effect from "effect/Effect";

export default Alchemy.Stack(
  "MyApp",
  {
    providers: Kubernetes.providers(),
    state: Alchemy.localState(),
  },
  Effect.gen(function* () {
    const cluster = yield* Kubernetes.LocalCluster("Cluster", { name: "alchemy" });

    const web = yield* Kubernetes.Deployment("Web", {
      cluster,
      name: "web",
      image: "ghcr.io/stefanprodan/podinfo:6.15.0",
      port: 9898,
      replicas: 2,
    });

    return { service: web.serviceName };
  }),
);

Swap LocalCluster for an EKS cluster from @alchemy.run/aws or a GKE cluster from @alchemy.run/gcp and the Deployment stays the same.

Learn more