Source of Inputs: VMware
Source of Images: VMware Tech Pubs Youtube Channel
--------------------
While checking Vmware social channel, I came through one of the video on vSphere 7 with Kubernetes and thought to share brief output through this blog. As we know that "vSphere 7 with Kubernetes" setup required huge compute resources even for inhouse nested lab as it's required VCF environment, unfortunetely I couldn't manage to get sufficient hardware to setup inhouse lab due to lockdown. Therefore I have captured the screenshot of the images from VMware videos itself and I won't forget to give credit. Thanks to VMware.
Well, In this blog, we will see the workflow to for creating and managing persistent storage in vSphere 7. Certain applications that run on Kubernetest required persistent volumes to retain their states and data and continue to exist even if pod is deleted or reconfigred. vSphere integrates with kubernetes and provide its storage resources so that kubernetes persistent volumes backed with virtual disk on datastores. There are several tasks that is being performed to achieve this task. These tasks are devided into vSphere Admin and DevOps Engineer. Step 1, 2, and 5 are the responsibility of vSphere Admin whereas Step 3 and 4 is responsibility of DevOps Engineer.
vSphere Administrator Creates Storage Policies using vSphere console.
Storage policy "Gold" has been created. You can verify it from here.
vSphere Admin assign storage policy to namespace.
To assign storage policy to namespace, go to vSphere console Home Page and click on Workload Management.
Under Namespaces and select namespace.
Under Storage panel, click on Edit Storage.
Select Storage Policy that you would like to add to namespace.
You can also set Resource Limits from "Capacity and Usage" panel.
After the vSphere Admin assign the storage policy to the namespace, the matching storage class appears in the kubernetes environment. Now DevOps Engineer will verify the Storage Class which is available.
Run below command to check the Storage Class.
$kubectl get storageclass
Now DevOps engineer can se the storage classess in persistent volme claims or deployments. After deployment of persistent volume claim that references the storage class, vSphere with Kubernetes creates a persistent volume object and a matching persistent volume disk.
vSphere Admin now monitors the persistent volumes and their backing virtual disks. To do that, go vSphere console Home page and Click on Workload Management, Click on Namespaces that has persistent volume.
Click the Storage tab, Go to Persistent Volume Claims. Click on the name of persistent volume claims.
Now it will show container volume page.
Scroll to down and Click on Container Volumes under Cloud Native Storage. Now you can check the volumes has status and storage policy compliance.
Click on Volume name and switch to Basics tab. You can see the Storage policy is assigned to Gold and it is Compliant.