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, TKG 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 TKG 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 IaaS Control Plane.
Procedure
- 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.
- In the vSphere Client, navigate to , and select a vSphere Namespace.
- Select the tab and locate the pane.
- Under Link to CLI Tools, either click Open or Copy Link.
- In a browser, open the Kubernetes CLI Tools download URL.
- Select the operating system.
- Download the
vsphere-plugin.zip
file.
- 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
TKG 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.