Is it possible to have AWS EBS persistent volumes on an on-prem K8s cluster?

1/16/2020

I wanted to use some AWS EBS volumes as a persistent storage for a deployment. I've configured the storage class and a PV, but I haven't been able to configure a Cloud provider.

The K8s documentation (as far as I understand) is for Kubernetes clusters running on a specific cloud provider, instead of an on-prem cluster using cloud resources. As the title says: Is it possible to have AWS EBS persistent volumes on an on-prem K8s cluster?

If so, can you a cloud provider to your existing cluster? (everything I've found online suggests that you add it when running kubeadm init).

Thank you!

-- Gaby
amazon-web-services
kubernetes

2 Answers

1/16/2020

You cannot use EBS storage in the same manner as you would when running on the cloud but you can use AWS Storage Gateway to store snapshots/backups of your volumes in cloud.

AWS Storage Gateway is a hybrid cloud storage service that connects your existing on-premises environments with the AWS Cloud

The feature you are intrested in is called Volume Gateway

The Volume Gateway presents your applications block storage volumes using the iSCSI protocol. Data written to these volumes can be asynchronously backed up as point-in-time snapshots of your volumes, and stored in the cloud as Amazon EBS snapshots.

Unfortunately you might not be able to automate creation of volumes in a way you could when running directly on AWS so some things you might have to do manually.

-- HelloWorld
Source: StackOverflow

1/16/2020

No you cannot because EBS can only be mounted inside AWS (usually in EC2 instances).

-- koe
Source: StackOverflow