Skip to content

Latest commit

 

History

History
86 lines (56 loc) · 1.86 KB

File metadata and controls

86 lines (56 loc) · 1.86 KB

Getting started (local development)

This tutorial walks through running the coder-k8s controller locally against a Kubernetes cluster, then creating your first CoderControlPlane resource.

Prerequisites

  • Go 1.25+ (go.mod currently declares Go 1.25.7)
  • A Kubernetes cluster (OrbStack, KIND, or any conformant cluster)
  • kubectl configured to your target context

If you use the Nix devshell:

nix develop

Optional: create a disposable KIND cluster with project defaults:

make kind-dev-up

1) Generate and install CRDs

Generate manifests:

make manifests

Install CRDs into your cluster:

kubectl apply -f config/crd/bases/

2) Run the controller locally

Start controller mode (terminal A):

GOFLAGS=-mod=vendor go run . --app=controller

Leave this terminal running so you can watch reconciliation logs.

3) Create a sample CoderControlPlane

In a second terminal (terminal B):

kubectl apply -f config/samples/coder_v1alpha1_codercontrolplane.yaml

4) Verify reconciliation

Check resource status:

kubectl get codercontrolplanes -A
kubectl describe codercontrolplane codercontrolplane-sample -n default

The controller creates a Deployment + Service named after the control plane (codercontrolplane-sample) in the same namespace.

kubectl get deploy,svc -n default

5) Clean up (optional)

kubectl delete codercontrolplane codercontrolplane-sample -n default

If you used kind-dev-up, you can remove the cluster with:

make kind-dev-down

Next steps