You can use Kubernetes CLI Tools for vSphere to view and control vSphere with Tanzu namespaces and clusters.

The Kubernetes CLI Tools download package includes two executables: the standard open-source kubectl and the vSphere Plugin for kubectl. The kubectl CLI has a pluggable architecture. The vSphere Plugin for kubectl extends the commands available to kubectl so that you connect to the Supervisor Cluster and to Tanzu Kubernetes clusters using vCenter Single Sign-On credentials.

Note: As a best practice, once you have performed a vSphere Namespace update and upgraded the Supervisor Cluster, update the vSphere Plugin for kubectl. See Update the vSphere Plugin for kubectl.

Prerequisites

  • Get the link for the Kubernetes CLI Tools download page from your vSphere administrator.
  • Alternatively, if you have access to the vCenter Server, get the link as follows:
    • Log in to the vCenter Server using the vSphere Client.
    • Navigate to vSphere Cluster > Namespaces and select the vSphere Namespace where you are working. In the example shown below, this is the "tkgs-ns" namespace that we created for our Tanzu Kubernetes clusters.
    • Select the Summary tab and locate the Status area on this page.
    • Select Open beneath the Link to CLI Tools heading to open the download page. Or, you can Copy the link.
    The vSphere Namespace configuration panel with the link to CLI tools circled.

Procedure

  1. Using a browser, navigate to the Kubernetes CLI Tools download URL for your environment. Refer to the prerequisites section above for guidance on how to locate the download URL.
    vSphere with Tanzu DevOps UI displays options to download the CLI tools package to view and control namespaces in vSphere.
  2. Select the operating system.
  3. Download the vsphere-plugin.zip file.
  4. Extract the contents of the ZIP file to a working directory.
    The vsphere-plugin.zip package contains two executable files: kubectl and vSphere Plugin for kubectl. kubectl is the standard Kubernetes CLI. kubectl-vsphere is the vSphere Plugin for kubectl to help you authenticate with the Supervisor Cluster and Tanzu Kubernetes clusters using your vCenter Single Sign-On credentials.
  5. Add the location of both executables to your system's PATH variable.
  6. To verify the installation of the kubectl CLI, start a shell, terminal, or command prompt session and run the command kubectl.
    You see the kubectl banner message, and the list of command-line options for the CLI.
  7. To verify the installation of the vSphere Plugin for kubectl, run the command kubectl vsphere.
    You see the vSphere Plugin for kubectl banner message, and the list of command-line options for the plugin.

What to do next

Configure Secure Login for vSphere with Tanzu Clusters.