Down Provisioner
Explore this Page
Overview
Provisioning storage resources in Kubernetes, especially in cloud environments, can be tedious and error-prone when done manually. The Down Provisioner simplifies this process by automating the creation of Replicated PV Mayastor DiskPools using PersistentVolumeClaims (PVCs) from cloud storage providers that support dynamic provisioning.
With the help of a Kubernetes operator and a custom resource definition (CRD) called DiskPoolClaim, you can declaratively provision DiskPools by referencing existing PVCs and defining your desired configuration. This streamlines storage setup and reduces the need for manual disk discovery or configuration.
DiskPoolClaim CRD
When you install DataCore Puls8, a CRD named DiskPoolClaim is automatically registered in your Kubernetes cluster. You can use this CRD to define a custom resource (CR) that specifies which PVC to use as the backing storage for a DiskPool, along with additional configuration options such as node selection, topology, and encryption.
Create a Basic DiskPool
To create a DiskPool with minimal configuration, define a DiskPoolClaim
:
apiVersion: "puls8.datacore.com/v0"
kind: DiskPoolClaim
metadata:
name: my-first-diskpool
namespace: puls8
spec:
nodeName: node-worker-1
source:
pvc:
name: my-cloud-pvc
In this example:
- Replace
node-worker-1
with the name of the node where you want to create the DiskPool. - Replace
my-cloud-pvc
with the name of a PVC that you have provisioned using your cloud provider.
Make sure your PVC is created with volumeMode: Block
and exists in the same namespace where DataCore Puls8 is deployed. Using the WaitForFirstConsumer
volume binding mode is recommended to allow the cloud provider to optimize volume placement.
Add Topology Labels
If you need to associate topology labels with the DiskPool for scheduling or placement purposes, you can extend your DiskPoolClaim
.
apiVersion: "puls8.datacore.com/v0"
kind: DiskPoolClaim
metadata:
name: my-first-diskpool
namespace: puls8
spec:
nodeName: node-worker-1
source:
pvc:
name: my-cloud-pvc
topology:
labelled:
topology-key: topology-value
Refer to the StorageClass Parameters Documentation for more information.
Enable Encryption
To enable encryption for your DiskPool, include an encryptionConfig
section that references a Kubernetes Secret.
apiVersion: "puls8.datacore.com/v0"
kind: DiskPoolClaim
metadata:
name: my-first-diskpool
namespace: puls8
spec:
nodeName: node-worker-1
source:
pvc:
name: my-cloud-pvc
topology:
labelled:
topology-key: topology-value
encryptionConfig:
source:
secret:
name: pool-secret
Refer to the Encryption Documentation for more information.
- You must select the node on which the DiskPool is created. This cannot be changed after creation.
- Your PVC must use
volumeMode: Block
and be located in the same namespace as DataCore Puls8. - All existing limitations of Mayastor DiskPools still apply.
Benefits of Down Provisioner
- Automation of DiskPool Creation: You no longer need to manually discover and configure block devices. Down Provisioner automates this process using familiar Kubernetes primitives like PVCs.
- Cloud Integration: You can take full advantage of your cloud provider’s dynamic provisioning capabilities. By referencing cloud-provisioned PVCs, you can align storage creation with your provider’s best practices.
- Declarative Configuration: You define your storage setup using YAML, which simplifies version control, auditing, and repeatability across environments.
- Node-Level Control: You explicitly control where your storage is placed by specifying the target node, which is essential for performance tuning and high availability scenarios
- Support for Topology and Encryption: You can include topology labels for intelligent workload placement and configure encryption to meet data security and compliance requirements.
- Reduced Operational Overhead: With streamlined provisioning and integration into Kubernetes workflows, you can reduce time spent on manual tasks and focus on higher-level operations.
Learn More