Hetzner Cloud CSI Driver
Installs the Container Storage Interface driver for Hetzner Cloud via static manifests. Provides persistent block storage (ReadWriteOnce) for Kubernetes using Hetzner Cloud Volumes.
- Upstream — hetznercloud/csi-driver
- License — MIT
- app_version — 2.20.0
- Kubernetes — >= 1.32 (tested: 1.33, 1.34, 1.35)
- Implementation — Static Kubernetes manifests (no Helm)
Prerequisites
- A Hetzner Cloud API token
- Kubernetes >= 1.32 with CSI support enabled
- The
hcloud-ccmblock should be installed first (cloud controller manager)
Configuration
token("") — Hetzner Cloud API token (required)namespace(kube-system) — Target namespacestorageclass.name(hcloud-volumes) — StorageClass namestorageclass.is_default(true) — Set as default StorageClassstorageclass.volume_binding_mode(WaitForFirstConsumer) — Volume binding modestorageclass.reclaim_policy(Delete) — Reclaim policystorageclass.allow_volume_expansion(true) — Allow volume expansionimages.driver(2.20.0) — hcloud-csi-driver versionimages.csi_attacher(4.11.0) — CSI attacher sidecar versionimages.csi_resizer(2.1.0) — CSI resizer sidecar versionimages.csi_provisioner(6.1.1) — CSI provisioner sidecar versionimages.csi_node_driver_registrar(2.16.0) — Node driver registrar versionimages.livenessprobe(2.18.0) — Liveness probe sidecar version
Actions
install
Deploys the CSI driver as a controller Deployment + node DaemonSet with proper RBAC, StorageClass, and CSIDriver resource.
blocks:
- name: csi
from: cargo.ayedo.cloud/ayedo/k8s/hcloud-csi
kubeconfig:
from: k8s
inventory:
from: vpc
config:
token: "HetznerCloudToken"
storageclass:
name: hcloud-volumes
is_default: true
uninstall
Removes the Hetzner Cloud CSI Driver from the cluster.
polycrate run csi uninstall
Warning: Uninstalling does not delete the Secret to prevent accidental token loss. Existing PersistentVolumes are not affected.
Deployed Resources
Secret/hcloud— API tokenCSIDriver/csi.hetzner.cloud— CSI driver registrationStorageClass/hcloud-volumes— Default storage classServiceAccount/hcloud-csi-controllerClusterRole/hcloud-csi-controller— Least-privilege RBACClusterRoleBinding/hcloud-csi-controllerDeployment/hcloud-csi-controller— Controller with CSI sidecarsDaemonSet/hcloud-csi-node— Node plugin on every cloud nodeService/hcloud-csi-controller-metrics— Prometheus metrics (port 9189)Service/hcloud-csi-node-metrics— Node metrics (port 9189)
Migration from < 1.0.0
This is a breaking change. The block config structure has changed completely:
is_default_class—storageclass.is_defaultvolume_binding_mode—storageclass.volume_binding_moderesource_prefix— removedk8s_worker_kubelet_conf_dir— removed (hardcoded to/var/lib/kubelet)force_install— removedv1_6_0.images.*—images.*v2_2_0.images.*—images.*v2_3_2.images.*—images.*
Upgrade procedure:
polycrate run csi uninstall(with old block version)- Update block to 1.0.0 (
polycrate block pull cargo.ayedo.cloud/ayedo/k8s/hcloud-csi) - Update
workspace.polyconfig to match new schema polycrate run csi install