Accessing vSphere with Tanzu workload clusters using SSH
search cancel

Accessing vSphere with Tanzu workload clusters using SSH

book

Article ID: 319389

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

You can gain access to Tanzu Kubernetes Clusters via SSH by using one of the below methods. Each method assumes you have access to the supervisor cluster control plane VMs.

Environment

VMware vCenter Server 7.0.x

Resolution

SSH key:

  • Log into the Supervisor Cluster
  • Run the following command using the bolded substitutions: kubectl  get secret <guest-cluster-name>-ssh -o jsonpath='{.data.ssh-privatekey}' -n <supervisor-namespace> | base64 -d > /tmp/mycluster-ssh-key
    • <guest-cluster-name> should be replaced with the name of the cluster
    • <supervisor-namespace> should be replaced with the namespace where the cluster is deployed
    • /tmp/mycluster-ssh-key can be left as is, or replaced with the desired path and name of the file
  • Change the file permissions on the generated SSH key: chmod 400 /tmp/mycluster-ssh-key
  • Access either control plane or worker nodes using the following syntax: ssh vmware-system-user@<node-IP> -i /tmp/mycluster-ssh-key

Plaintext Password:

  • Log into the Supervisor Cluster
  • Run the following command using the bolded substitutions: kubectl  get secret <guest-cluster-name>-ssh-password -o jsonpath='{.data.ssh-passwordkey}' -n <supervisor-namespace> | base64 -d
    • <guest-cluster-name> should be replaced with the name of the cluster
    • <supervisor-namespace> should be replaced with the namespace where the cluster is deployed
  • The resulting plaintext can be copy/pasted and used to log in to a control plane or a worker node after running the following command: ssh vmware-system-user@<node-IP>

Additional Information