Default Storage Providers in DKP
Default storage providers in DKP
When deploying DKP using a supported cloud provisioner (AWS, Azure, GCP), DKP automatically configures native storage drivers for the target platform. In addition, DKP deploys a default StorageClass for dynamic persistent volume (PV) creation. The table below lists the driver and default StorageClass for each supported cloud provisioner.
Cloud Provisioner | Version | Driver | Default Storage Class |
---|---|---|---|
AWS |
|
| |
Azure |
|
| |
Pre-provisioned |
|
| |
vSphere |
|
| |
GCP |
|
|
When creating a pre-provisioned infrastructure cluster, DKP uses the local static provisioner as the default storage provider. However, localvolumeprovisioner
is not suitable for production use. You should use a Kubernetes CSI compatible storage that is suitable for production.
You can choose from any of the storage options available for Kubernetes. To disable the default that Konvoy deploys, set the default StorageClass localvolumeprovisioner
as non-default. Then set your newly created StorageClass to be the default by following the commands in the Kubernetes documentation called Changing the Default Storage Class.
When a default StorageClass is specified, persistent volume claims (PVCs) can be created without needing to specify the storage class. For instance, to request a volume using the default provisioner, create a PVC with the following:
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: my-pv-claim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 4Gi
To start the provisioning of a volume, launch a pod which references the PVC:
...
volumeMounts:
- mountPath: /data
name: persistent-storage
...
volumes:
- name: persistent-storage
persistentVolumeClaim:
claimName: my-pv-claim
Change or Manage Multiple Storage Classes
The default StorageClass
provisioned with DKP is acceptable for install, but may not suitable for production. If your workload has different requirements, you can create additional StorageClass
types with specific configurations. You can change the default StorageClass
using these steps from the Kubernetes site:
Ceph can also be used as CSI storage. Refer to that section in the documentation for information on how to use Rook Ceph.
Driver Information
All default drivers implement the Container Storage Interface (CSI). The CSI provides a common abstraction to container orchestrators for interacting with storage subsystems of various types. Each driver has specific configuration parameters which effect PV provisioning. This section details the default configuration for drivers used with DKP. This section also has links to driver documentation, if further customization is required.
NOTE: StorageClass
parameters cannot be changed after creation. To use a different volume configuration, you must create a new StorageClass
.
Amazon Elastic Block Store (EBS) CSI Driver
DKP EBS default StorageClass
:
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
annotations:
storageclass.kubernetes.io/is-default-class: "true" # This tells kubernetes to make this the default storage class
name: ebs-sc
provisioner: ebs.csi.aws.com
reclaimPolicy: Delete # volumes are automatically reclaimed when no longer in use and PVCs are deleted
volumeBindingMode: WaitForFirstConsumer # Physical volumes will not be created until a pod is created that uses the PVC, required to use CSI's Topology feature
parameters:
csi.storage.k8s.io/fstype: ext4
type: gp3 # General Purpose SSD
DKP deploys with gp3 (general purpose SSDs) EBS volumes.
Driver documentation: aws-ebs-csi-driver
Volume types and pricing: volume types
Azure CSI Driver
DKP deploys with StandardSSD_LRS for Azure Virtual Disks.
Driver documentation: azuredisk-csi-driver
Volume types and pricing: volume types
Specifics for Azure using Pre-provisioning can be found here: Pre-provisioned Azure only Configurations
vSphere CSI Driver
DKP default storage class for vSphere supports dynamic provisioning and static provisioning of block volumes.
Driver documentation: https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/index.html
Specifics for using vSphere storage driver: https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/2.0/vmware-vsphere-csp-getting-started/GUID-5D144DA0-4806-4DEB-8819-10A1C42E38AB.html
Pre-provisioned CSI Driver
In a pre-provisioned environment, DKP will also deploy a CSI compatible driver and configure a default StorageClass - localvolumeprovisioner
.
Driver documentation: local-static-provisioner
DKP uses local-static-provisioner (localvolumeprovisioner
) as the default storage provider for a pre-provisioned environment. However, local-static-provisioner is not suitable for production use. You should use a different Kubernetes CSI compatible storage that is suitable for production.
To disable the default that Konvoy deploys, set the default StorageClasslocalvolumeprovisioner
as non-default. Then set your newly created StorageClass by following the steps in the Kubernetes documentation: https://kubernetes.io/docs/tasks/administer-cluster/change-default-storage-class/. You can choose from any of the storage options available for Kubernetes and make your storage choice the default storage.
Ceph can also be used as CSI storage. Refer to that section in the documentation for information on how to use Rook Ceph.
GCP CSI Driver
This driver allows volumes backed by Google Cloud Filestore instances to be dynamically created and mounted by workloads.
Driver documentation: gcp-filestore-csi-driver
Persistent volumes and dynamic provisioning: volume types