Filesystem PVC and POD Workload
This chart will install the following resources:
- A
PVC
namedexample-fs-pvc
referencing the previously definedStorageClass.
- A
POD
namedexample-fs-pod
usingexample-fs-pvc.
Deploying the Filesystem Workload
helm install \
--set filesystem.enabled=true \
lb-csi-workload-filesystem \
lightbits-helm-repo/lb-csi-workload-examples
Will output:
NAME: lb-csi-workload-filesystem
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:
- Specifying
nodeSelector
:
helm template \
--set filesystem.enabled=true \
--set filesystem.nodeSelector."beta\.kubernetes\.io/arch"=amd64,filesystem.nodeSelector.disktype=ssd \
lightbits-helm-repo/lb-csi-workload-examples
Will result in:
kind: Pod
apiVersion: v1
metadata:
name: example-filesystem-pod
spec:
nodeSelector:
beta.kubernetes.io/arch: amd64
disktype: ssd
containers:
...
- Specifying
nodeName
:
helm template \
--set filesystem.enabled=true \
--set filesystem.nodeName=node00.local \
lightbits-helm-repo/lb-csi-workload-examples
Will result in:
kind: Pod
apiVersion: v1
metadata:
name: example-fs-pod
spec:
nodeName: node00.local
containers:
...
Verifying the Filesystem Workload Deployed
Verify that PV
, PVC
are created and in Bounded
state, and that POD
is in Running
state:
x
kubectl get pv,pvc,pods
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
persistentvolume/pvc-e0ad4f63-4b42-417f-8bed-94f8aec8f0d5 10Gi RWO Delete Bound default/example-fs-pvc example-sc 33s
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
persistentvolumeclaim/example-fs-pvc Bound pvc-e0ad4f63-4b42-417f-8bed-94f8aec8f0d5 10Gi RWO example-sc 34s
NAME READY STATUS RESTARTS AGE
pod/example-fs-pod 1/1 Running 0 34s
Uninstalling the Filesystem Workload
helm uninstall lb-csi-workload-filesystem
Verify that all resources are gone:
kubectl get pv,pvc,pods
No resources found in default namespace.
Was this page helpful?