coder-k8s requires an explicit application mode.
For the controller:
GOFLAGS=-mod=vendor go run . --app=controllerFor the aggregated API server:
GOFLAGS=-mod=vendor go run . --app=aggregated-apiserverThis usually means the CRD isn't installed in the cluster.
make manifests
kubectl apply -f config/crd/bases/-
Check controller logs:
kubectl logs -n coder-system deploy/coder-k8s-controller
-
Confirm RBAC is applied:
kubectl get clusterrole coder-k8s-controller kubectl get clusterrolebinding coder-k8s-controller
If kubectl get codertemplates.aggregation.coder.com or kubectl get coderworkspaces.aggregation.coder.com returns empty data unexpectedly, check for CRD/APIService conflicts.
When both of these exist at once:
APIServicev1alpha1.aggregation.coder.com- CRDs
codertemplates.aggregation.coder.comand/orcoderworkspaces.aggregation.coder.com
Kubernetes may not route reads the way you expect for demos.
kubectl get apiservice v1alpha1.aggregation.coder.com
kubectl get crd codertemplates.aggregation.coder.com coderworkspaces.aggregation.coder.comFor APIService-based demos, remove the conflicting aggregation CRDs:
kubectl delete crd codertemplates.aggregation.coder.com coderworkspaces.aggregation.coder.com
kubectl apply -f deploy/apiserver-apiservice.yaml
kubectl wait --for=condition=Available apiservice/v1alpha1.aggregation.coder.com --timeout=120s-
Ensure the deployment and service exist:
kubectl get deploy,svc -n coder-system | grep coder-k8s-apiserver -
Inspect APIService status:
kubectl describe apiservice v1alpha1.aggregation.coder.com
-
Check the aggregated API server logs:
kubectl logs -n coder-system deploy/coder-k8s-apiserver