gcloud beta container hub scopes namespaces get-credentials Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud beta container hub scopes namespaces get-credentials - fetch credentials for a membership with a particular namespace
- SYNOPSIS
gcloud beta container hub scopes namespaces get-credentialsNAMESPACE[--membership=MEMBERSHIP][--membership-location=MEMBERSHIP_LOCATION][--set-namespace-in-config=SET_NAMESPACE_IN_CONFIG][GCLOUD_WIDE_FLAG …]
- EXAMPLES
- Get the Connect Gateway kubeconfig for global membership
MEMBERSHIP, using namespaceNAMESPACEin the config:gcloudbetacontainerhubscopesnamespacesget-credentialsNAMESPACE--membership=MEMBERSHIP--membership-location=global--set-namespace-in-config=trueGet the Connect Gateway kubeconfig for global membership
MEMBERSHIP:gcloudbetacontainerhubscopesnamespacesget-credentialsNAMESPACE--membership=MEMBERSHIP--membership-location=global - POSITIONAL ARGUMENTS
NAMESPACE- Name of the namespace for which to get access to memberships.
- FLAGS
--membership=MEMBERSHIP- Membership ID to get credentials from. If not provided, a prompt will offer alist of memberships in the fleet.
--membership-location=MEMBERSHIP_LOCATION- The location of the membership resource, e.g.
us-central1. If notspecified, defaults toglobal. --set-namespace-in-config=SET_NAMESPACE_IN_CONFIG- If true, the default namespace for the context in the generated kubeconfig willbe set to the Fleet namespace (i.e. the name given as the positional argument inthis command).
Otherwise, no default namespace will be set, functioning the same as
gcloudcontainer fleet memberships get-credentials.
- 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 beta and might change without notice. Thesevariants are also available:
gcloudcontainerhubscopesnamespacesget-credentialsgcloudalphacontainerhubscopesnamespacesget-credentials
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.