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, download and install the latest edition of the vSphere Plugin for kubectl a vSphere Namespaces update. 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 Supervisor Namespace where you are working.
    • 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.

Procedure

  1. Using a browser, navigate to the Kubernetes CLI Tools download URL for your environment.
  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

Download and Install TLS Certificates.