{"id":628,"date":"2022-01-16T14:31:34","date_gmt":"2022-01-16T12:31:34","guid":{"rendered":"https:\/\/www.petersplanet.nl\/?p=628"},"modified":"2022-01-16T21:27:30","modified_gmt":"2022-01-16T19:27:30","slug":"vsphere-with-tanzu-kubernetes","status":"publish","type":"post","link":"https:\/\/www.petersplanet.nl\/index.php\/2022\/01\/16\/vsphere-with-tanzu-kubernetes\/","title":{"rendered":"vSphere with Tanzu (Kubernetes)"},"content":{"rendered":"\n<p>Now that the home lab is up&amp;running I wanted to gain some experience with Kubernetes on the VMware platform. For this I completed the vSphere with Tanzu Quickstart Guide V1a. <\/p>\n\n\n\n<!--more-->\n\n\n\n<p>The guide can be found via the link below:<\/p>\n\n\n\n<p><a href=\"https:\/\/core.vmware.com\/resource\/vsphere-tanzu-quick-start-guide-v1a#_Toc53677530\">https:\/\/core.vmware.com\/resource\/vsphere-tanzu-quick-start-guide-v1a#_Toc53677530<\/a><\/p>\n\n\n\n<p>I have just followed this quick start.<br>Some settings I have used:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Kept the default VM Network switch for the management network.<\/li><li>Created a distributed switch for the workload network<\/li><li>Management network: 10.0.1.0<\/li><li>Supervisor cluster (5 IPs): 10.0.1.60 (starting IP)<\/li><li>Workload network: 10.0.2.0<\/li><li>Workload network loadbalancer IP: 10.0.2.31<\/li><li>Workload network IP address range: 10.0.20.\/27 (10.0.2.3 &#8211; 10.0.2.30)<\/li><li>Load balancer IP range: 10.0.2.32\/27 (10.0.2.33 &#8211; 10.0.2.62)<\/li><li>HAProxy version:  v0.1.10 (the 0.2.0 version did not work).<\/li><\/ul>\n\n\n\n<p>After Tanzu is running you can login with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>kubectl vsphere login --server=https:\/\/10.0.2.34 --vsphere-username devops@vsphere.local --insecure-skip-tls-verify\nkubectl config get-contexts\nkubectl config use-context namespace01\n<\/code><\/pre>\n\n\n\n<p>After this is working it is time to deploy a workload on the Tanzu Kubernetes cluster. For this I followed the vSphere with Tanzu Quick Start Demo from the begin until the end. It can be found at:<\/p>\n\n\n\n<p><a href=\"https:\/\/github.com\/vsphere-tmm\/vsphere-with-tanzu-quick-start\">https:\/\/github.com\/vsphere-tmm\/vsphere-with-tanzu-quick-start<\/a><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The name of the storage policy in vCenter must be the same as used in the StorageClass Kubernetes tkc.yaml file.<br>&#8220;Storage policies visible to a vSphere Namespace determine which datastores the namespace can access and use for persistent volumes. The storage policies appear as matching Kubernetes storage classes in the namespace. They are also propagated to the Tanzu Kubernetes cluster on this namespace.&#8221;<\/li><li>All the kubectl commands were performed in a Linux terminal. Not everything worked well in a Windows command terminal.<\/li><\/ul>\n\n\n\n<p>tkc.yaml file to create the Kubernetes cluster.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\rapiVersion: run.tanzu.vmware.com\/v1alpha1\r\nkind: TanzuKubernetesCluster\r\nmetadata:\r\n  name: tkc-1\r\nspec:\r\n  distribution:\r\n    version: v1.18\r\n  topology:\r\n    controlPlane:\r\n      class: guaranteed-small\r\n      count: 1\r\n      storageClass: kubernetes-demo-storage\r\n    workers:\r\n      class: guaranteed-small\r\n      count: 1\r\n      storageClass: kubernetes-demo-storage\r\n  settings:\r\n    storage:\r\n      classes: &#91;\"kubernetes-demo-storage\"]              #Named PVC storage classes\r\n      defaultClass: kubernetes-demo-storage             #Default PVC storage class\r\n<\/code><\/pre>\n\n\n\n<p>Some screenshots from vCenter.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"574\" src=\"https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2022\/01\/kubernetes01-1024x574.jpg\" alt=\"\" class=\"wp-image-630\" srcset=\"https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2022\/01\/kubernetes01-1024x574.jpg 1024w, https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2022\/01\/kubernetes01-300x168.jpg 300w, https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2022\/01\/kubernetes01-768x431.jpg 768w, https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2022\/01\/kubernetes01-1536x861.jpg 1536w, https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2022\/01\/kubernetes01-1140x639.jpg 1140w, https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2022\/01\/kubernetes01.jpg 1553w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"373\" src=\"https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2022\/01\/kubernetes02-1024x373.jpg\" alt=\"\" class=\"wp-image-631\" srcset=\"https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2022\/01\/kubernetes02-1024x373.jpg 1024w, https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2022\/01\/kubernetes02-300x109.jpg 300w, https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2022\/01\/kubernetes02-768x280.jpg 768w, https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2022\/01\/kubernetes02-1140x415.jpg 1140w, https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2022\/01\/kubernetes02.jpg 1447w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"288\" src=\"https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2022\/01\/kubernetes04-1024x288.jpg\" alt=\"\" class=\"wp-image-633\" srcset=\"https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2022\/01\/kubernetes04-1024x288.jpg 1024w, https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2022\/01\/kubernetes04-300x84.jpg 300w, https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2022\/01\/kubernetes04-768x216.jpg 768w, https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2022\/01\/kubernetes04-1536x432.jpg 1536w, https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2022\/01\/kubernetes04-1140x321.jpg 1140w, https:\/\/www.petersplanet.nl\/wp-content\/uploads\/2022\/01\/kubernetes04.jpg 1568w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now that the home lab is up&amp;running I wanted to gain some experience with Kubernetes on the VMware platform. For this I completed the vSphere with Tanzu Quickstart Guide V1a.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-628","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/posts\/628","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/comments?post=628"}],"version-history":[{"count":13,"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/posts\/628\/revisions"}],"predecessor-version":[{"id":646,"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/posts\/628\/revisions\/646"}],"wp:attachment":[{"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/media?parent=628"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/categories?post=628"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.petersplanet.nl\/index.php\/wp-json\/wp\/v2\/tags?post=628"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}