You can use Kubernetes CLI Tools for vSphere to log in to the Supervisor control plane, access the vSphere Namespaces for which you have permissions, and deploy and manage vSphere Pods, Tanzu Kubernetes Grid clusters, and VMs.

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 and to Tanzu Kubernetes Grid clusters through vCenter Single Sign-On credentials.

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

Procedure

  1. Get the IP address or FQDN of the Supervisor control plane, which is also the download URL for the Kubernetes CLI Tools for vSphere.
    In case you are a DevOps engineer, who doesn't have access to the vSphere environment, you can ask your vSphere administrator to perform the below steps.
    1. In the vSphere Client, navigate to Workload Management > Namespaces, and select a vSphere Namespace.
    2. Select the Summary tab and locate the Status pane.
    3. Under Link to CLI Tools, either click Open or Copy Link.The vSphere Namespace configuration panel with the link to CLI tools circled.
  2. In a browser, open the Kubernetes CLI Tools download URL.
    vSphere with Tanzu DevOps user interface displays options to download the CLI tools package to view and control namespaces in vSphere.
  3. Select the operating system.
  4. Download the vsphere-plugin.zip file.
  5. 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 and Tanzu Kubernetes clusters using your vCenter Single Sign-On credentials.
  6. Add the location of both executables to your system's PATH variable.
  7. 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.
  8. 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.