News

Back
2019
March
15
2019

Persistent Volumes in Kubernetes with CSI

Even if the acronym reminds of an American TV series at first: Thanks to supporting the "Container Storage Interface" (CSI), cloudscale.ch is one of the first providers worldwide to offer an elegant and flexible solution for using persistent storage in a Kubernetes setup.

Why more and more of our customers are using Kubernetes

There are several reasons to run applications or microservices in containers such as Docker. Examples include proper separation or independent deployments of individual services. Since container virtualization, unlike fully virtualized machines, causes hardly any overhead, even a fine-granular separation of services in containers consumes only marginally more resources.

Kubernetes (or "K8s") is an orchestration solution for managing such containers. It launches all the required containers in the desired number and distributes them across the available nodes. If a container fails, it is automatically restarted on a suitable node. Last but not least, Kubernetes can be controlled using config files and scripts and thus perfectly integrated into configuration management systems.

How CSI enables self-service for storage

By default, such containers have ephemeral storage, i.e. changes in the file system of a container are lost on restarts. Of course, so-called "persistent volumes" can also be created and passed through to a container. Up to now, however, this was typically associated with manual effort as well as coupling to a specific node and therefore did not really fit into the concept of dynamic containers.

With the recently adopted "Container Storage Interface" (CSI), there is now a defined standard for triggering the automatic creation of an according volume from a "Persistent Volume Claim". This volume is then mounted directly in the corresponding container – no matter which node the container is currently running on. Of course, the volume can also be re-attached to another container and deleted right from within Kubernetes if required.

What other advantages CSI offers at cloudscale.ch

Just like the volumes of our virtual machines, persistent volumes for Kubernetes are based on lightning-fast SSD-only storage and can be of virtually any size. For space requirements of 100 GB or more, inexpensive bulk storage is available as well. The selection is made right in the Persistent Volume Claim using the parameter "storageClassName" (cloudscale-volume-ssd or cloudscale-volume-bulk).

As an additional feature, we also offer full disk encryption with LUKS. Encrypted volumes are created easily by providing a special storageClassName and can only be used if a section with the correct encryption key is configured in Kubernetes – a potential attacker without this key will only see data garbage. Whether encrypted or not: at cloudscale.ch persistent volumes for Kubernetes are stored exclusively in data centers located in Switzerland.


For your very first steps we recommend Rancher for the easy installation of a basic setup with Kubernetes. From there, you just need to install the cloudscale.ch CSI driver from GitHub and configure an API token generated in the Cloud Control Panel once. Of course, various configuration examples for containers and volumes are available on GitHub, too.

Cast off!
Your cloudscale.ch team

Back to overview