Docs/Controlplane/Kubernetes
Open

Reading1 min
Updated31 Jul 2026
Sourcev1/providers/kubernetes.mdx

The Kubernetes provider maps Ctrl Plane operations to native Kubernetes resources — Deployments, Services, ConfigMaps, and Secrets — for production-grade container orchestration.

Status01

Interface defined — the package structure exists at provider/kubernetes and implements the provider.Provider interface. Full implementation is in progress.

Configuration02

import "github.com/xraph/ctrlplane/provider/kubernetes"

prov, err := kubernetes.New(kubernetes.Config{
    Kubeconfig: "/path/to/kubeconfig",
    Namespace:  "ctrlplane",
    InCluster:  false,
})
FieldEnvDefaultDescription
KubeconfigCP_K8S_KUBECONFIGPath to kubeconfig file
NamespaceCP_K8S_NAMESPACEdefaultTarget namespace for resources
InClusterCP_K8S_IN_CLUSTERfalseUse in-cluster service account
LabelsCP_K8S_LABELSDefault labels applied to all resources

Capabilities03

CapabilitySupported
provisionYes
deployYes
scaleYes
logsYes
execYes
volumesYes
gpuYes
rollingYes
blue_greenYes
canaryYes
autoscaleYes
custom_domainsVia Ingress
tlsVia cert-manager

Resource mapping04

Ctrl Plane conceptKubernetes resource
InstanceDeployment + Service
Environment variablesConfigMap + Secret
PortsService ports
Resources (CPU/Memory)Resource requests/limits
Custom domainsIngress rules
TLS certificatescert-manager Certificate
Health checksLiveness/readiness probes
ScalingHPA (Horizontal Pod Autoscaler)

Deployment strategies05

The Kubernetes provider supports all three deployment strategies:

  • Rolling — maps to Kubernetes RollingUpdate strategy with configurable maxSurge and maxUnavailable.

  • Blue-Green — creates a new Deployment, verifies health, then switches the Service selector.

  • Canary — runs the new version alongside the old with weighted traffic splitting.

When to use06

  • Production multi-node deployments

  • Environments that need auto-scaling, self-healing, and rolling updates

  • Teams already running Kubernetes clusters

  • Workloads requiring GPU access or persistent volumes