CLI plugin: login
| Primarily used for: Tanzu CLI
This command logs you in to Tanzu.
tanzu login [FLAGS]
And:
tanzu login [COMMAND]
login
, lo
, and logins
tanzu login completion
Ignore this command. To enable command completion for Tanzu CLI commands, use tanzu completion
.
To list available servers:
tanzu login
To log in to a server, for example, my-mgmt-cluster
, using the --endpoint
option:
tanzu login --endpoint "https://login.example.com" --name my-mgmt-cluster
To log in to my-mgmt-cluster
using the --kubeconfig
and --context
options:
tanzu login --kubeconfig /tmp/path/to/kubeconfig --context my-mgmt-cluster-admin@my-mgmt-cluster --name my-mgmt-cluster
To log in to my-mgmt-cluster
using the default kubeconfig
path and the --context
option:
tanzu login --context my-mgmt-cluster-admin@my-mgmt-cluster --name my-mgmt-cluster
To log in to an existing server, for example, my-mgmt-cluster
:
tanzu login --server my-mgmt-cluster
--apiToken
The Tanzu API token for global login.
--context
The kubeconfig
context of the target server.
--endpoint
The endpoint that you are logging in to.
-h, --help
Help text.
--kubeconfig
The path to the kubeconfig
file of the management cluster. If only the --context
flag is set, tanzu login
reads the KUBECONFIG
environment variable. If the KUBECONFIG
environment variable is not set, the default kubeconfig
path, $HOME/.kube/config
, is used.
--name
The name of the server.
--server
The name of the existing server that you are logging in to.