Use native Kubernetes APIs to run and manage Coder.
Warning
This is experimental alpha software from a hackathon. Do not use it in production. Do not make it available to end users.
coder-k8s is one binary with three components:
| Component | Manages | API group |
|---|---|---|
| Operator | CoderControlPlane, CoderProvisioner, CoderWorkspaceProxy (custom resources) |
coder.com/v1alpha1 |
| Aggregated API server | CoderWorkspace, CoderTemplate, CoderTemplateVersion (served from a live Coder instance) |
aggregation.coder.com/v1alpha1 |
| MCP server | Tools that inspect and operate these resources over HTTP | — |
The operator is a Kubernetes controller. It creates and updates the Coder control planes, provisioners, and workspace proxies that these custom resources describe. The aggregated API server adds Coder workspaces and templates to the Kubernetes API, so you can use kubectl with them. The MCP (Model Context Protocol) server gives tools to AI agents and other MCP clients.
The --app flag selects the components that run. The default, --app=all, runs the operator and the aggregated API server in one process. The MCP server runs only with --app=mcp-http. For all values, see Architecture.
Run these commands from a clone of this repository:
kubectl create namespace coder-system
kubectl apply -f config/crd/bases/ -f config/rbac/
kubectl apply -f deploy/
kubectl rollout status deployment/coder-k8s -n coder-systemThen create a Coder instance:
kubectl create namespace coder
kubectl apply -f config/samples/coder_v1alpha1_codercontrolplane.yamlFor all the steps, see Deploy a Coder Control Plane.
The documentation is at https://coder.github.io/coder-k8s/. The source is in docs/. To show a local preview, run make docs-serve.
| Example | Shows |
|---|---|
examples/cloudnativepg/ |
A CoderControlPlane that uses a CloudNativePG PostgreSQL database |
examples/argocd/ |
The full stack from one Argo CD ApplicationSet |
examples/coder-templates/ |
CoderTemplate manifests that you can use again |
See CONTRIBUTING.md. The license is Apache-2.0.