When deploying an application that needs to retain data, you’ll need to create persistent storage. Persistent storage allows you to store application data external from the pod running your application. This storage practice allows you to maintain application data, even if the application’s pod fails.

Rancher can only manage storage in clusters created with RKE.

The documents in this section assume that you understand the Kubernetes concepts of persistent volumes, persistent volume claims, and storage classes. For more information, refer to the section on how storage works.

Setting up Existing Storage

The overall workflow for setting up existing storage is as follows:

  1. Set up persistent storage in an infrastructure provider.
  2. Add a persistent volume (PV) that refers to the persistent storage.
  3. Add a persistent volume claim (PVC) that refers to the PV.
  4. Mount the PVC as a volume in your workload.

For details and prerequisites, refer to this page.

Dynamically Provisioning New Storage in Rancher

The overall workflow for provisioning new storage is as follows:

  1. Add a storage class and configure it to use your storage provider.
  2. Add a persistent volume claim (PVC) that refers to the storage class.
  3. Mount the PVC as a volume for your workload.

For details and prerequisites, refer to this page.

Provisioning Storage Examples

We provide examples of how to provision storage with NFS, vSphere, and Amazon’s EBS.

GlusterFS Volumes

In clusters that store data on GlusterFS volumes, you may experience an issue where pods fail to mount volumes after restarting the kubelet. For details on preventing this from happening, refer to this page.

iSCSI Volumes

In Rancher Launched Kubernetes clusters that store data on iSCSI volumes, you may experience an issue where kubelets fail to automatically connect with iSCSI volumes. For details on resolving this issue, refer to this page.