Step 1: Deploy a K8s workload cluster
tkg create cluster <cluster name> --plan=dev
Step 2: Switch context to the K8s workload cluster
kubectl config use-context <cluster name>
Verify using:
kubectl config get-contexts
Step 3: Create SC and PVC
The next step is to create a storage class on this K8s workload cluster. The applications/ pods will use this storage class to dynamically provision Persistent Storage Claims (PVC) as per requirement. Here I will be using the vSAN Datastore to provision storage for the K8s pods.
Create a storage class
Create a persistent volume claim
You can see this 10 GB volume created in the vCenter console.
Step 4: Deploy a FIO pod
I am deploying an FIO (Flexible IO) application pod. FIO is a storage IO generation tool.
Step 5: Verify
kubectl get pvc
kubectl get pods
SSH into the pod and verify the pvc is mounted to it as specified in the YAML file.
Hope it was useful. Cheers!
No comments:
Post a Comment