Continental Innovates with Rancher and Kubernetes
This section describes how to provision new persistent storage for workloads in Rancher.
This section assumes that you understand the Kubernetes concepts of storage classes and persistent volume claims. For more information, refer to the section on how storage works.
New storage is often provisioned by a cloud provider such as Amazon EBS. However, new storage doesn’t have to be in the cloud.
If you have a pool of block storage, and you don’t want to use a cloud provider, Longhorn could help you provide persistent storage to your Kubernetes cluster. For more information, see this page.
To provision new storage for your workloads, follow these steps:
The following storage provisioners are enabled by default:
To use a storage provisioner that is not on the above list, you will need to use a feature flag to enable unsupported storage drivers.
These steps describe how to set up a storage class at the cluster level.
Amazon EBS Disk
Result: The storage class is available to be consumed by a PVC.
For full information about the storage class parameters, refer to the official Kubernetes documentation..
StatefulSets manage the deployment and scaling of Pods while maintaining a sticky identity for each Pod. In this StatefulSet, we will configure a VolumeClaimTemplate. Each Pod managed by the StatefulSet will be deployed with a PersistentVolumeClaim based on this VolumeClaimTemplate. The PersistentVolumeClaim will refer to the StorageClass that we created. Therefore, when each Pod managed by the StatefulSet is deployed, it will be bound to dynamically provisioned storage using the StorageClass defined in its PersistentVolumeClaim.
Result: When each Pod managed by the StatefulSet is deployed, it will make a request for the specified amount of disk space to the Kubernetes master. If a PV with the specified resources is available when the workload is deployed, the Kubernetes master will bind the PV to Pod with a compatible PVC.
To attach the PVC to an existing workload,
Result: The workload will make a request for the specified amount of disk space to the Kubernetes master. If a PV with the specified resources is available when the workload is deployed, the Kubernetes master will bind the PV to the PVC. If not, Rancher will provision new persistent storage.