<p>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. </p>

<p>The K8s <a href="https://kubernetes.io/docs/concepts/cluster-administration/cloud-providers/" rel="nofollow noreferrer">documentation</a> (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? </p>

<p>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).</p>

<p>Thank you!</p>

<p>You cannot use EBS storage in the same manner as you would when running on the cloud but you can use <a href="https://aws.amazon.com/storagegateway/features/" rel="nofollow noreferrer">AWS Storage Gateway</a> to store snapshots/backups of your volumes in cloud.</p>

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

<p>The feature you are intrested in is called <strong>Volume Gateway</strong></p>

<blockquote>
  <p>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.</p>
</blockquote>

<p>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.</p>
