gcloud alpha anthos auth login Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud alpha anthos auth login - authenticate clusters using the Anthos client
- SYNOPSIS
gcloud alpha anthos auth login[--no-browser][--cluster=CLUSTER][--dry-run][--kubeconfig=KUBECONFIG][--login-config=LOGIN_CONFIG][--login-config-cert=LOGIN_CONFIG_CERT][--remote-bootstrap=REMOTE_BOOTSTRAP][--server=SERVER][--set-preferred-auth][--user=USER][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
(ALPHA)Authenticate clusters using the Anthos client.- EXAMPLES
- To add credentials to default kubeconfig file:
gcloudalphaanthosauthlogin--cluster=testcluster--login-config=kubectl-anthos-config.yamlTo add credentials to custom kubeconfig file:
gcloudalphaanthosauthlogin--cluster=testcluster--login-config=kubectl-anthos-config.yaml--kubeconfig=my.kubeconfigTo generate the commands without executing them:
gcloudalphaanthosauthlogin--cluster=testcluster--login-config=kubectl-anthos-config.yaml--dry-runTo add credentials to default kubeconfig file using server side login:
To add credentials to custom kubeconfig file using server side login:gcloudalphaanthosauthlogin--cluster=testcluster--server=<server-url> To add credentials to custom kubeconfig file with server side login using aremote-device for login:gcloudalphaanthosauthlogin--cluster=testcluster--server=<server-url>--kubeconfig=my.kubeconfiggcloudalphaanthosauthlogin--cluster=testcluster--server=<server-url>--kubeconfig=my.kubeconfig--no-browser - FLAGS
--no-browser- Option to indicate login completion on a second device with browser.Used with
serveroption. --cluster=CLUSTER- Cluster to authenticate against. If no cluster is specified, the command willprint a list of available options.
--dry-run- Print out the generated kubectl commands but do not execute them.
--kubeconfig=KUBECONFIG- Specifies the destination kubeconfig file where credentials will be stored.
--login-config=LOGIN_CONFIG- Specifies the configuration yaml file for login. Can be a file path or a URL.
--login-config-cert=LOGIN_CONFIG_CERT- Specifies the CA certificate file to be added to trusted pool for making HTTPSconnections to a
--login-configURL. --remote-bootstrap=REMOTE_BOOTSTRAP- Option to complete login that was started using
no-browseroptionona remote device that does not have a browser. --server=SERVER- Specifies the URL of API server of the cluster to authenticate against.
--set-preferred-auth- If set, forces update of preferred authentication for given cluster
--user=USER- If configuring multiple user accounts in the same kubecconfig file, you canspecify a user to differentiate between them.
- GCLOUD WIDE FLAGS
- These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$gcloud helpfor details. - NOTES
- This command is currently in alpha and might change without notice. If thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. These variants are also available:
gcloudanthosauthlogingcloudbetaanthosauthlogin
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-07 UTC.