Deploying Block PVC and POD

This chart will install the following resources:

  • A PVC named example-block-pvc referencing the previously defined StorageClass.

  • A POD named example-block-pod using example-block-pvc.

Deploying the Block Workload

helm install \
--set block.enabled=true \
lb-csi-workload-block \
lightbits-helm-repo/lb-csi-workload-examples

Will output:

NAME: lb-csi-workload-block
LAST DEPLOYED: Sun Feb 21 16:09:02 2021
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None

Deploying 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:

  1. 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-examples

Will result in:

kind: Pod
apiVersion: v1
metadata:
name: example-block-pod
spec:
nodeSelector:
beta.kubernetes.io/arch: amd64
disktype: ssd
containers:
...
  1. Specifying nodeName:

helm template \
--set block.enabled=true \
--set block.nodeName=node00.local \
lightbits-helm-repo/lb-csi-workload-examples

Will result in:

kind: Pod
apiVersion: v1
metadata:
name: example-block-pod
spec:
nodeName: node00.local
containers:
...

Verifying the Block Workload

Verify that PV, PVC are created and in Bounded state and POD is in Running state.

kubectl get pv,pvc,pods
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
persistentvolume/pvc-2b3b510d-bc4c-4528-a431-3923b8b7d443 3Gi RWO Delete Bound default/example-block-pvc example-sc 2m55s

NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
persistentvolumeclaim/example-block-pvc Bound pvc-2b3b510d-bc4c-4528-a431-3923b8b7d443 3Gi RWO example-sc 2m56s

NAME READY STATUS RESTARTS AGE
pod/example-block-pod 1/1 Running 0 2m56s

Uninstalling the Block Workload

helm uninstall lb-csi-workload-block

Verify that all resources are gone.

kubectl get pv,pvc,pods
No resources found in default namespace.