Thursday, July 9, 2020

Tanzu Kubernetes Grid (TKG) on vSphere 6.7 U3 - Part3

In this blog, I will explain how to deploy an FIO application pod with persistent storage on your Tanzu Kubernetes workload cluster.

Step 1: Deploy a K8s workload cluster

tkg create cluster <cluster name> --plan=dev


Now the workload K8s cluster is deployed with a Master, LB, and Worker node.



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 sc

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