gcloud container attached clusters import

NAME
gcloud container attached clusters import - import fleet membership for an Attached cluster
SYNOPSIS
gcloud container attached clusters import--distribution=DISTRIBUTION--platform-version=PLATFORM_VERSION(--context=CONTEXT :--kubeconfig=KUBECONFIG)(--fleet-membership=FLEET_MEMBERSHIP :--fleet-membership-location=FLEET_MEMBERSHIP_LOCATION; default="global")[--async][--location=LOCATION][--validate-only][--proxy-secret-name=PROXY_SECRET_NAME--proxy-secret-namespace=PROXY_SECRET_NAMESPACE][GCLOUD_WIDE_FLAG]
DESCRIPTION
Import fleet membership for an Attached cluster.
EXAMPLES
To import the fleet membership of an attached cluster in fleetFLEET_MEMBERSHIP managed in locationus-west1, run:
gcloudcontainerattachedclustersimport--location=us-west1--platform-version=PLATFORM_VERSION--fleet-membership=FLEET_MEMBERSHIP--distribution=DISTRIBUTION--context=CLUSTER_CONTEXT--kubeconfig=KUBECONFIG_PATH
REQUIRED FLAGS
--distribution=DISTRIBUTION
Set the base platform type of the cluster to attach.

Examples:

gcloudcontainerattachedclustersimport--distribution=aksgcloudcontainerattachedclustersimport--distribution=eksgcloudcontainerattachedclustersimport--distribution=generic
--platform-version=PLATFORM_VERSION
Platform version to use for the cluster.

To retrieve a list of valid versions, run:

gcloudalphacontainerattachedget-server-config--location=LOCATION

ReplaceLOCATION with the target GoogleCloud location for the cluster.

kubectl config

This must be specified.

--context=CONTEXT
Context to use in the kubeconfig.

This flag argument must be specified if any of the other arguments in this groupare specified.

--kubeconfig=KUBECONFIG
Path to the kubeconfig file.

If not provided, the default at ~/.kube/config will be used.

Fleet membership resource - Membership of the registered cluster. Membership canbe the membership ID or the full resource name. The arguments in this group canbe used to specify the attributes of this resource. (NOTE) Some attributes arenot given arguments in this group but can be set in other ways.

To set theproject attribute:

  • provide the argument--fleet-membership on the command line with afully specified name;
  • provide the argument--project on the command line;
  • set the propertycore/project.

This must be specified.

--fleet-membership=FLEET_MEMBERSHIP
ID of the fleet_membership or fully qualified identifier for thefleet_membership.

To set thefleet_membership attribute:

  • provide the argument--fleet-membership on the command line.

This flag argument must be specified if any of the other arguments in this groupare specified.

--fleet-membership-location=FLEET_MEMBERSHIP_LOCATION; default="global"
Google Cloud location for the fleet_membership.

To set thelocation attribute:

  • provide the argument--fleet-membership on the command line with afully specified name;
  • provide the argument--fleet-membership-location on the commandline;
  • set the propertycontainer_attached/location.
OPTIONAL FLAGS
--async
Return immediately, without waiting for the operation in progress to complete.
Location resource - Google Cloud location to import attached cluster.. Thisrepresents a Cloud resource. (NOTE) Some attributes are not given arguments inthis group but can be set in other ways.

To set theproject attribute:

  • provide the argument--location on the command line with a fullyspecified name;
  • set the propertycontainer_attached/location with a fully specifiedname;
  • provide the argument--project on the command line;
  • set the propertycore/project.
--location=LOCATION
ID of the location or fully qualified identifier for the location.

To set thelocation attribute:

  • provide the argument--location on the command line;
  • set the propertycontainer_attached/location.
--validate-only
Validate the cluster to import, but don't actually perform it.
Proxy config
--proxy-secret-name=PROXY_SECRET_NAME
Name of the Kubernetes secret that contains the HTTP/HTTPS proxy configuration.

This flag argument must be specified if any of the other arguments in this groupare specified.

--proxy-secret-namespace=PROXY_SECRET_NAMESPACE
Namespace of the Kubernetes secret that contains the HTTP/HTTPS proxyconfiguration.

This flag argument must be specified if any of the other arguments in this groupare specified.

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:
gcloudalphacontainerattachedclustersimport

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 2026-01-21 UTC.