Home > front end >  How to make the Kubernetes volumes cloud agnostic?
How to make the Kubernetes volumes cloud agnostic?

Time:10-25

Currently, my Kubernetes cluster is provisioned via GKE.

I use GCE Persistent Disks to persist my data.

In GCE, persistent storage is provided via GCE Persistent Disks. Kubernetes supports adding them to Pods or PersistenVolumes or StorageClasses via the gcePersistentDisk volume/provisioner type.

What if I would like to transfer my cluster from Google to, lets say, Azure or AWS? Then I would have to change value of volume type to azureFile or awsElasticBlockStore respectively in all occurrences in the manifest files.

I hope CSI driver will solve that problem, unfortunately, they also use a different type of volume for each provider cloud provider, for example pd.csi.storage.gke.io for GCP or disk.csi.azure.com for Azure.

Is there any convenient way to make the Kubernetes volumes to be cloud agnostic? In which I wouldn't have to make any changes in manifest files before K8s cluster migration.

CodePudding user response:

You cannot have cloud agnostic storage by using the CSI drivers or the native VolumeClaims in Kubernetes. That's because these API's are the upstream way of provisioning storage which each cloud provider has to integrate with to translate them into the Cloud Specific API (PD for Google, EBS for AWS...)

Unless you have a self-managed Storage that you can access via an NFS driver or a specific driver from the tools managed above. And still with that the Self-Managed Storage solution is going to be based on a Cloud provider specific volume. So You are just going to shift the issue to a different place.

  • Related