Deploying Block PVC and POD
This chart will install the following resources:
- A
PVCnamedexample-block-pvcreferencing the previously definedStorageClass. - A
PODnamedexample-block-podusingexample-block-pvc.
Deploying the Block Workload
helm install \ --set block.enabled=true \ lb-csi-workload-block \ lightbits-helm-repo/lb-csi-workload-examplesWill output:
NAME: lb-csi-workload-blockLAST DEPLOYED: Sun Feb 21 16:09:02 2021NAMESPACE: defaultSTATUS: deployedREVISION: 1TEST SUITE: NoneDeploying the POD on a Specific K8S Node
You can choose to deploy the POD on a specific K8s node by specifying nodeName or nodeSelector in the template.
The default values for these parameters are empty, which means the POD will not be limited to any POD.
Examples:
- Specifying
nodeSelector:
helm template \--set block.enabled=true \--set block.nodeSelector."beta\.kubernetes\.io/arch"=amd64,block.nodeSelector.disktype=ssd \lightbits-helm-repo/lb-csi-workload-examplesWill result in:
kind: PodapiVersion: v1metadata:name: example-block-podspec:nodeSelector:beta.kubernetes.io/arch: amd64disktype: ssdcontainers:...- Specifying
nodeName:
helm template \--set block.enabled=true \--set block.nodeName=node00.local \lightbits-helm-repo/lb-csi-workload-examplesWill result in:
kind: PodapiVersion: v1metadata:name: example-block-podspec:nodeName: node00.localcontainers:...Verifying the Block Workload
Verify that PV, PVC are created and in Bounded state and POD is in Running state.
x
kubectl get pv,pvc,podsNAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGEpersistentvolume/pvc-2b3b510d-bc4c-4528-a431-3923b8b7d443 3Gi RWO Delete Bound default/example-block-pvc example-sc 2m55sNAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGEpersistentvolumeclaim/example-block-pvc Bound pvc-2b3b510d-bc4c-4528-a431-3923b8b7d443 3Gi RWO example-sc 2m56sNAME READY STATUS RESTARTS AGEpod/example-block-pod 1/1 Running 0 2m56sUninstalling the Block Workload
helm uninstall lb-csi-workload-blockVerify that all resources are gone.
kubectl get pv,pvc,podsNo resources found in default namespace.Was this page helpful?