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 

Deploying the Kubernetes Dashboard

 

  

INTRODUCTION


This demo shows how to deploy the Kubernetes Dashboard inside a Tanzu Kubernetes Grid Cluster running on vSphere with Kubernetes. 


The Kubernetes Dashboard is a web-based interface for viewing and managing Kubernetes clusters.  You can use Dashboard to deploy containerized applications, troubleshoot your containerized applications, as well as view and manage TKG cluster resources.


The dashboard can be especially helpful for Cloud Foundation administrators who are new to vSphere with Kubernetes as it helps to facilitates cluster management and troubleshooting without requiring an extensive knowledge of the underlying Kubernetes API and “kubectl” command syntax.


More information about the Kubernetes Dashboard can be found here:  https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/.

 

 

DEMO PROCEEDURE


The Kubernetes dashboard runs as a containerized application inside each TKG Cluster.  To deploy the dashboard we first need to login to the TKG cluster.  This requires the IP address of the Supervisor Cluster, the name of the vSphere Namespace, and the name of the TKG Cluster.  This information can be retrieved using the vSphere Web Client.

  • Click Menu
  • Click Workload Management
  • Click Clusters


Here we see the details for the Kubernetes Supervisor Cluster along with the IP address for the Kubernetes control plane, “192.168.51.1”.


  • Click Namespaces


Here we see the namespaces that have been created on the Supervisor Cluster.  In this case, there is a single namespace named “wld01-ns01”.

  • Click wld01-ns01

Under the “compute” tab we are able to view the TKG clusters that have been deployed, “gc01” in this example.

We now have the information need to authenticate and login to the TKG Cluster.


  • Click the Putty Icon
  • Click Continue


We login using the “kubectl vsphere login …” command, passing in the namespace and TKG Cluster name. 


After we have authenticated, we need to identify the “context” (in this example the TKG Cluster) that we want to use.  Notice that the TKG Cluster “gc01” is listed as one of the options.

  • Click Continue


We are now connected to the TKG Cluster “gc01”. 

  • Click Continue


Inside our TKG Cluster there are several default Kubernetes Namespaces.  We can display these namespaces using the command “kubectl get ns”  (‘ns’ is a shortcut for ‘namespaces’).


Prior to deploying the Dashboard application we need to complete two prerequisites:


1.     Create a new namespace where we will deploy the dashboard, named “Kubernetes-dashboard”


2.     Configure a RoleBinding to enable pods to be deployed in the new namespace


To do this we create a YAML manifest as shown here.

  • Click Continue


We then apply the changes using the “kubectl apply -f <manifest>” command.

  • Click Continue


We re-run the “kubectl get ns” command to verify that the new “kubernetes-dashboard” namespace has been created.

  • Click Continue


Next we download the YAML manifest for the Kubernetes Dashboard.

  • Click Continue to scroll through the YAML manifest.


This is a relatively large manifest and a detailed explanation of the individual resources it out of scope for this demo.   A detailed overview of the manifest can be found here:  https://kubernetes.io/docs/tasks/access-application-cluster/web-ui-dashboard/.


Simply download the manifest and save it to your local workstation.

  • Click Continue


With the manifest saved to our local workstation we then apply it using the “kubectl apply -f <manifest>” command.

  • Click Continue


That’s it.  The Kubernetes Dashboard application has been deployed.  With the Dashboard UI deployed, we can use the “kubectl” command to review the components that make up the application.

  • Click Continue


Using the “kubectl get deployments –namespace kubernetes-dashboard” command we see there are two deployments. 

  • Click Continue


Using the “kubectl get pods –namespace kubernetes-dashboard” command we see there are currently two pods. 

  • Click Continue


To access the dashboard from outside the TKG Cluster we need an external IP address.  For this we will deploy a service of type “loadbalancer”.  Here we see the YAML manifest for that.

  • Click Continue


Again, we simply apply the manifest and let Kubernetes take care of the work to configure the loadbalancer.

  • Click Continue


To get the IP address that has been assigned we run the “kubectl get kuberntes-dashboard-lb –namespace kubernetes-dashboard” command.  In this example the assigned IP address is192.168.51.2.

  • Click the Firefox Icon


To access the Dashboard, we simply open a web browser and connect to the IP address over port 443 (https).

  • Click the URL


To access the Dashbaord we need to login.  There are two ways to authenticate.  Using the “Kubeconfig” or using a “Token”.  In this example we will use the token approach.  For this we need to query the Kubernetes Control plane for the token that was created when we logged into the TKG Cluster.

  • Click the Putty Icon
  • Click Continue


To do this we use the command “kubectl config view”.

  • Click Continue


Here we see two tokens.  Note the first token is tied to the IP address 192.168.51.1, which is the Supervisor Cluster.  The second token is tied to the IP address 192.168.51.3, which is the “gc01” TKG Cluster.  We copy the second token. 

  • Click the Firefox Icon
  • Click the Token radio button


We paste in the token that was copied in the previous step.

  • Click Sign In.


We have successfully logged into the Kubernetes Dashboard.  From here we can use the dashboard to browse our TKG Cluster as well as deploy new containerized applications.

  • Click Default
  • Click the Scroll Bar
  • Click kubernetes-dashboard


For example, here we are able to view the details of our Kubernetes Dashboard app that we just deployed.

  • Click the Scroll Bar
  • Click the Scroll Bar
  • Click the Chrome Icon
  • Click Menu
  • Click Host and Clusters


This completes our demo on deploying the Kubernetes Dashboard inside a TKG Cluster.

 

 

SUMMARY


The Kubernetes Dashboard is a containerized application that delivers a a web-based interface for viewing and managing TKG Clusters.  You can use Dashboard to deploy containerized applications, troubleshoot your applications, as well as view and manage TKG cluster resources.


The dashboard can be especially helpful for Cloud Foundation administrators who are new to vSphere with Kubernetes as it helps to facilitates cluster management and troubleshooting without requiring an extensive knowledge of the Kubernetes API and “kubectl” command.


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  https://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!