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.
- 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 Namespace where you are working. In the example shown below, this is the "tkgs-ns" namespace that we created for our Tanzu Kubernetes clusters. and select the
- Select the tab and locate the area on this page.
- Select Open beneath the heading to open the download page. Or, you can Copy the link.
- 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.
- Select the operating system.
- Download the
- 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.
kubectlis the standard Kubernetes CLI.
kubectl-vsphereis the vSphere Plugin for kubectl to help you authenticate with the Supervisor Cluster and Tanzu Kubernetes clusters using your vCenter Single Sign-On credentials.
- Add the location of both executables to your system's PATH variable.
- 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.
- 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.