- NAME
-
- gcloud edge-cloud container clusters get-credentials - get credentials of an edge-container cluster
- SYNOPSIS
-
-
gcloud edge-cloud container clusters get-credentials
(CLUSTER
:--location
=LOCATION
) [--auth-provider-cmd-path
=AUTH_PROVIDER_CMD_PATH
] [--offline-credential
] [GCLOUD_WIDE_FLAG …
]
-
- DESCRIPTION
-
Fetch credentials for a running Edge Container cluster. This command updates a
kubeconfig file with appropriate credentials and endpoint information to point
kubectl at a specific Edge Container cluster. By default, credentials are
written to
. You can provide an alternate path by setting theHOME/.kube/config
environment variable. IfKUBECONFIG
contains multiple paths, the first one is used. This command enables switching to a specific cluster, when working with multiple clusters. It can also be used to access a previously created cluster from a new workstation. The command will configure kubectl to automatically refresh its credentials using the same identity as the gcloud command-line tool. See https://cloud.google.com/kubernetes-engine/docs/kubectl for kubectl documentation.KUBECONFIG
- EXAMPLES
-
To get credentials of a cluster named
managed in locationmy-cluster
, run:us-west1
gcloud edge-cloud container clusters get-credentials my-cluster --location=us-west1
- POSITIONAL ARGUMENTS
-
-
Cluster resource - Edge Container cluster to get credentials. The arguments in
this group can be used to specify the attributes of this resource. (NOTE) Some
attributes are not given arguments in this group but can be set in other ways.
To set the
project
attribute:-
provide the argument
cluster
on the command line with a fully specified name; -
provide the argument
--project
on the command line; -
set the property
core/project
.
This must be specified.
CLUSTER
-
ID of the cluster or fully qualified identifier for the cluster.
To set the
cluster
attribute:-
provide the argument
cluster
on the command line.
This positional argument must be specified if any of the other arguments in this group are specified.
-
provide the argument
--location
=LOCATION
-
Google Cloud location for the cluster.
To set the
location
attribute:-
provide the argument
cluster
on the command line with a fully specified name; -
provide the argument
--location
on the command line.
-
provide the argument
-
provide the argument
-
Cluster resource - Edge Container cluster to get credentials. The arguments in
this group can be used to specify the attributes of this resource. (NOTE) Some
attributes are not given arguments in this group but can be set in other ways.
- FLAGS
-
--auth-provider-cmd-path
=AUTH_PROVIDER_CMD_PATH
- Path to the gcloud executable for the auth provider field in kubeconfig.
--offline-credential
- Once specified, an offline credential will be generated for the cluster.
- 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 help
for details. - NOTES
-
This variant is also available:
gcloud alpha edge-cloud container clusters get-credentials
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-02-06 UTC.