coder-k8s

command module
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

coder-k8s

CI Go License

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.

What you get

coder-k8s is one binary with three components:

Component Manages API group
Operator CoderControlPlane, CoderProvisioner, CoderTemplateTest, 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, templates, and template versions to the Kubernetes API, so you can use kubectl with them. Template versions are read-only. 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.

Quick start

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-system

Then create a Coder instance:

kubectl create namespace coder
kubectl apply -f config/samples/coder_v1alpha1_codercontrolplane.yaml

For all the steps, see Deploy a Coder Control Plane.

Documentation

The documentation is at https://coder.github.io/coder-k8s/. The source is in docs/. To show a local preview, run make docs-serve.

Examples

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

Contributing

See CONTRIBUTING.md. The license is Apache-2.0.

Documentation

Overview

Package main provides the entrypoint for the coder-k8s binary.

Directories

Path Synopsis
api
aggregation/v1alpha1
Package v1alpha1 contains API schema definitions for the aggregation.coder.com API group.
Package v1alpha1 contains API schema definitions for the aggregation.coder.com API group.
v1alpha1
Package v1alpha1 contains API schema definitions for the coder.com API group.
Package v1alpha1 contains API schema definitions for the coder.com API group.
hack
e2e/mcpstub command
Command mcpstub is the Kind E2E stub of the CoderMCPServer plan (#155, section 7.2).
Command mcpstub is the Kind E2E stub of the CoderMCPServer plan (#155, section 7.2).
gen-coder-docs-skill command
Package main implements a CLI tool that generates the coder-docs Mux agent skill by syncing a text-only snapshot of the coder/coder documentation and injecting a navigation tree into SKILL.md.
Package main implements a CLI tool that generates the coder-docs Mux agent skill by syncing a text-only snapshot of the coder/coder documentation and injecting a navigation tree into SKILL.md.
internal
aggregated/apiservicetrust
Package apiservicetrust keeps the aggregated API server's APIService trusting its serving CA.
Package apiservicetrust keeps the aggregated API server's APIService trusting its serving CA.
aggregated/coder
Package coder provides shared Coder backend helpers for the aggregated API server.
Package coder provides shared Coder backend helpers for the aggregated API server.
aggregated/convert
Package convert maps codersdk models to aggregated API resources and request payloads.
Package convert maps codersdk models to aggregated API resources and request payloads.
aggregated/servingcert
Package servingcert manages the aggregated API server's serving certificate.
Package servingcert manages the aggregated API server's serving certificate.
aggregated/storage
Package storage implements codersdk-backed REST storage for the aggregated API server's CoderWorkspace, CoderTemplate and CoderTemplateVersion resources.
Package storage implements codersdk-backed REST storage for the aggregated API server's CoderWorkspace, CoderTemplate and CoderTemplateVersion resources.
app/allapp
Package allapp composes the controller and aggregated API server app modes in one process.
Package allapp composes the controller and aggregated API server app modes in one process.
app/apiserverapp
Package apiserverapp provides the aggregated API server application mode for coder-k8s.
Package apiserverapp provides the aggregated API server application mode for coder-k8s.
app/controllerapp
Package controllerapp provides the controller-runtime application mode for coder-k8s.
Package controllerapp provides the controller-runtime application mode for coder-k8s.
app/mcpapp
Package mcpapp provides MCP server application modes for coder-k8s.
Package mcpapp provides MCP server application modes for coder-k8s.
app/sharedscheme
Package sharedscheme provides reusable runtime scheme construction across app modes.
Package sharedscheme provides reusable runtime scheme construction across app modes.
coderbootstrap
Package coderbootstrap contains optional bootstrap integrations with the Coder API.
Package coderbootstrap contains optional bootstrap integrations with the Coder API.
controller
Package controller contains Kubernetes controllers for coder-k8s resources.
Package controller contains Kubernetes controllers for coder-k8s resources.
controlplaneurl
Package controlplaneurl derives the URL that operator components use for Coder API calls to a CoderControlPlane.
Package controlplaneurl derives the URL that operator components use for Coder API calls to a CoderControlPlane.
credentialsecret
Package credentialsecret implements the credential Secret contract: the rules a Kubernetes Secret must meet before a controller sends its value to a remote service or puts it into a pod.
Package credentialsecret implements the credential Secret contract: the rules a Kubernetes Secret must meet before a controller sends its value to a remote service or puts it into a pod.
credentialsecret/credentialsecrettest
Package credentialsecrettest holds test helpers for the credential Secret contract.
Package credentialsecrettest holds test helpers for the credential Secret contract.
deps
Package deps keeps baseline Kubernetes dependencies in go.mod for bootstrap.
Package deps keeps baseline Kubernetes dependencies in go.mod for bootstrap.
sameorigin
Package sameorigin keeps credentials on the origin they were meant for.
Package sameorigin keeps credentials on the origin they were meant for.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL