Clusters created with Syself Autopilot comes with the CSI driver for hcloud working out-of-the-box. A Storage Class is available in your cluster, exposing the underlying Hetzner storage to be used by your workload.
In this guide, you'll see an example application making use of Hetzner volumes.
A Storage Class called standard
is present in your workload cluster. This is the Storage Class you should use if you want to store data in Hetzner volumes.
Below you can find an example manifest showing how to create a Persistent Volume using the standard
Storage Class and bind it to a pod using a Persistent Volume Claim:
Now any data stored under /usr/share/nginx/html
inside the pv-container
will be persisted.
Currently, ReadWriteMany volumes are not supported by Hetzner CSI. This means you can't mount volumes with read and write permissions by many nodes.
You can still share a ReadWriteOnce volume between multiple pods, but it's required that all of them be on the same node. This could be achieved by setting a node affinity.