How to access a cluster created by Tanzu Mission Control when no web browser is available
search cancel

How to access a cluster created by Tanzu Mission Control when no web browser is available

book

Article ID: 316840

calendar_today

Updated On:

Products

Tanzu Mission Control

Issue/Introduction

This article provides instructions need to access a cluster created by Tanzu Mission Control when no web browser is available on the system where kubectl commands are being run.

Symptoms:
  • You are unable to login to a cluster created by Tanzu Mission control from a system with no web browser.
  • You see messages similar to the following when running the provided kubectl --kubeconfig=<path/to>/kubeconfig-test-<cluster-name>.yml get namespaces command:
Error: exec: "xdg-open": executable file not found in $PATH
Unable to connect to the server: getting credentials: exec: exit status 1

 
Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.


Cause

The initial connection to a cluster created by Tanzu Mission Control requires a web-based authentication to tanzu.broadcom.com. If no web browser is available on the system where kubectl commands are run, the authentication attempt will fail.

Resolution

This is a known issue affecting Tanzu Mission Control. There is currently no resolution.

Workaround:
Use the following steps to workaround this issue:

  1. On the system where you will run kubectl commands, issue the following command:
export TMC_BROWSER=none
  1. Download the provided <cluster-name>.yml file to the system where you will run kubectl commands.
  2. Issue the provided kubectl --kubeconfig=<path/to>/kubeconfig-test-<cluster-name>.yml get namespaces command.
Note: You will see output similar to the following:

Go to the following link in your browser:
https://console.tanzu.broadcom.com/ 
  1. Copy the provided link from the output of Step 3 and paste in to the URL bar in a browser on a different system where a web browser is available.
Note:  If you are not already logged in to cloud.vmware.com, you will be presented with a login screen. Enter your credentials. After you login, or if you were already logged in, you will see a page displaying the following text:

tmc login flow complete

You are authenticated and can close this page.


Your kubectl command should complete and you will see a list of namespaces in the cluster.

Note: An alternative workaround would be to run the provided kubectl command from a system with a web browser installed and after the authentication is successful, copy the .vmware-cna-saas folder from the user's home directory to the system where you will normally run kubectl commands. The authentication token in this folder will be active for 90 days.