To log in securely to Supervisor and TKG 2.0 clusters, configure the vSphere Plugin for kubectl with the appropriate TLS certificate and ensure that you are running the latest edition of the plugin.
Supervisor CA Certificate
vSphere with Tanzu supports vCenter Single Sign-On for cluster access using the vSphere Plugin for kubectl command kubectl vsphere login …
.
The vSphere Plugin for kubectl defaults to secure login and requires a trusted certificate, the default being the certificate signed by the vCenter Server root CA. Although the plugin supports the --insecure-skip-tls-verify
flag, for security reasons this is not recommended.
Option | Instructions |
---|---|
Download and install the vCenter Server root CA certificate on each client machine. |
Refer to the VMware knowledge base article How to download and install vCenter Server root certificates. |
Replace the VIP certificate used for the Supervisor with a certificate signed by a CA each client machine trusts. |
See Installing and Configuring vSphere with Tanzu. |
TKG Cluster CA Certificate
To connect securely with the TKG cluster API server using the kubectl
CLI, you need to download the TKG 2.0 cluster CA certificate.
If you are using the latest edition of the vSphere Plugin for kubectl, the first time you log in to the TKG 2.0 cluster, the plugin registers the TKG cluster CA certificate in the kubeconfig file. This certificate is also stored in the Kubernetes secret named TANZU-KUBERNETES-CLUSTER-NAME-ca
. The plugin uses the certificate to populate the CA information in the corresponding cluster's certificate authority datastore.
If you have updated Supervisor, make sure you update to the latest version of the plugin.