Loading Wird geladen Cargando 正在加载 Chargement en cours 載入 Carregando 読み込み中 로드 중 Caricamento in corso Загрузка  

Sorry

Your web browser doesn't support some required capabilities.

This interactive demo works best with the latest version of Chrome, Firefox, or Safari.

Sorry

An error occurred. Please reload the page or download again from the VMware Demo Library:

For VMware partners:
www.vmware.com/go/partnerdemos

For VMware employees:
www.vmware.com/go/demos

Sorry

Visit the VMware Demo Library
to get more demos!

For VMware partners:
www.vmware.com/go/partnerdemos

For VMware employees:
www.vmware.com/go/demos

Sorry

Unable to initialize the simulation player:

This demo file may be incomplete or damaged. Please reload the page or download again from the VMware Demo Library:

For VMware partners:
www.vmware.com/go/partnerdemos

For VMware employees:
www.vmware.com/go/demos

X

This is an interactive demo

Drive it with your mouse, your finger, or just use the arrow keys.

Use Learn mode to learn the demo. The orange boxes show where to click.

Use Present mode to hide the orange boxes and notes.

Click a Shortcut to jump to a specific part of the demo.

X

VMware Cloud Foundation 

Download CLI Tools and Deploy TKG Cluster

 

Welcome to this demonstration on downloading the vSphere with Kubernetes CLI tools and creating a Tanzu Kubernetes Grid (TKG) cluster.

After vSphere with Kubernetes has been enabled on a Cloud Foundation workload domain, and a namespace configured, you are ready to hand it off to your developers.  Before developers can access the namespace to deploy TKG clusters they first need to download the vSphere with Kubernetes CLI tool.

Downloading the Kubernetes CLI tool involves accessing a web page hosted on the supervisor cluster to download a version of the “kubectl” binary that includes a vSphere plugin.  You can download the CLI tool and share it with your developers, or you can provide them access to the URL where they can download the CLI tool on their own. 

This demonstration shows how to download the vSphere with Kubernetes CLI plugin and use it to connect to the control plan and deploy a TKG cluster.

We begin at the namespace summary page

  • Click Open

From the Kubernetes CLI Tools webpage we are able to download the Kubernetes CLI tool for our preferred operating system.

  • Click Select Operating System
  • Click Linux

Notice in the terminal window on the right side of the screen we see an example showing how to use the “wget” command to download and install the CLI tools.  We will follow this example to download the CLI tools to our Linux workstation.

  • Click the link to open a terminal

We begin by running the wget command to download the vsphere-plugin.zip file to our workstation.

  • Click the terminal window

We see the vsphere-plugin.zip file has been saved to the local filesystem.  Next we unzip the archive.

  • Click the terminal window

The ZIP archive consists of two binaries: “kubectl” and “kubectl-vsphere”.  We simply copy these binaries to a directory that is on our local path.

  • Click the terminal window

In this example, we have copied the two binaries to the /usr/local/bin directory on our workstation.  We did a couple quick checks to make sure /usr/local/bin is in our path and that we have the correct version.

Next, we will authenticate using our SSO credentials and confirm that we have access to the namespaces.

  • Click the terminal window

That’s it.  We now have the CLI tools installed on our laptop and have confirmed we are able to login and access our namespace.  We are ready to begin deploying TKG clusters on our vSphere with Kubernetes cluster.

Before we deploy a TKG cluster, let’s look at our cluster from the vSphere Web Client. 

  • Click the vSphere - wld01-ns01 browser tab

Here we see the wld01-clus01 cluster.  We see the three supervisor nodes that were created when we enabled vSphere with Kubernetes.  We also see the Harbor Registry (vmware-system-registry-1…) and a single namespace named “wld01-ns01”. 

We will return to our Linux workstation to deploy a TKG cluster.  We will then return to the vSphere Web Client to view the new objects that get created when we do this.

  • Click the link to open a terminal

We start by connecting to the desired namespace.   To do this we use the “kubectl config get-context” to list the available namespaces.

  • Click the terminal window

We then use the “kubectl config use-context” command to connect to the desired namespace.  In this example we will connect to the “wld01-ns01” namespace.

  • Click the terminal window

Now that we are connect to our namespace, we are ready to create our TKG cluster.  This is done using a YAML manifest file. 

  • Click the Terminal Window

Here we see the YAML manifest.  This file instructs Kubernetes to deploy a simple TKG cluster named gc01.  The TKG cluster will have 1 control plane node and two worker nodes.  Note that the YAML manifest currently has the wrong namespace name.  We need to change the namespace name from “ns01” to “wld01-ns01”.

  • Click the Terminal Window

We easily update the YAML manifest with the correct namespace name.

  • Click the Terminal Window

Using the VI editor we simply change the namespace name from ns01 to wld-ns01.

  • Click the Terminal Window

To deploy the TKG cluster we run the command “kubectl apply -f DeployGuestCluster.yaml”.

  • Click the Terminal Window

Notice that in the vSphere web client we see several tasks being executed to deploy the TKG Cluster.

We can also monitor the progress using the kubectl command  by running the command “kubectl get tkc”.

  • Click the Terminal Window

Here we see the TKG cluster is still being created.  It will take approximately 15 minutes to deploy the TKG cluster.

  • Click the vSphere - wld01-ns01 browser tab

Returning to the vSphere Web Client we see a new object named “gc01” in the inventory.   This is the TKG Cluster we created using the kubectl command from our Linux workstation.

  • Click gc01

Remember, the YAML manifest called for a TKG cluster that was comprised of a 1 control plane and 2 worker nodes.  We see the control plane node is deployed first.  Shortly after, we see the two worker nodes get deployed.

  • Click to close the task pane

We see in the vSphere web client that our TKG Cluster has been deployed.  Let’s return to our Linux workstation and check the status using the kubectl command.

  • Click the link to open a terminal
  • Click the terminal window

We are able to confirm that the TKG cluster has been created and is in a running state.

This concludes the demonstration on creating a new namespace on vSphere with Kubernetes. 

After vSphere with Kubernetes has been enabled on a Cloud Foundation workload domain and a namespace configured, you are ready to hand it off to your developers.  Before the developers can access the namespace to deploy TKG clusters they need to download the vSphere with Kubernetes CLI tools. 

Downloading the Kubernetes CLI tools involves accessing a web page hosted on the supervisor cluster to download the “kubectl” binary that includes a vSphere plugin.  You can download the CLI tools and share them with the developers, or you can provide them access to the URL where they can download them on their own.  Once downloaded, developers use the kubectl command to authenticate to the namespace, pick their desired namespace, and deploy TKG clusters.

For more VMware Cloud Foundation demos visit the Cloud Foundation Resource Center at https://vmware.com/go/vcfrc.

For more information on VMware Cloud Foundation, visit our website at vmware.com/go/cloudfoundation.

How likely is it that you would recommend this demo to a friend or colleague?
Not at all likely Extremely likely
Thanks, we appreciate your feedback!