This tutorial walks through running the coder-k8s controller locally against a Kubernetes cluster, then creating your first CoderControlPlane resource.
- Go 1.25+ (
go.modcurrently declares Go 1.25.7) - A Kubernetes cluster (OrbStack, KIND, or any conformant cluster)
kubectlconfigured to your target context
If you use the Nix devshell:
nix developOptional: create a disposable KIND cluster with project defaults:
make kind-dev-upGenerate manifests:
make manifestsInstall CRDs into your cluster:
kubectl apply -f config/crd/bases/Start controller mode (terminal A):
GOFLAGS=-mod=vendor go run . --app=controllerLeave this terminal running so you can watch reconciliation logs.
In a second terminal (terminal B):
kubectl apply -f config/samples/coder_v1alpha1_codercontrolplane.yamlCheck resource status:
kubectl get codercontrolplanes -A
kubectl describe codercontrolplane codercontrolplane-sample -n defaultThe controller creates a Deployment + Service named after the control plane (codercontrolplane-sample) in the same namespace.
kubectl get deploy,svc -n defaultkubectl delete codercontrolplane codercontrolplane-sample -n defaultIf you used kind-dev-up, you can remove the cluster with:
make kind-dev-down- Deploy in-cluster: How-to → Deploy controller
- Understand internals: Explanation → Architecture
- Explore aggregated APIs: How-to → Deploy aggregated API server