Organízate con las colecciones
Guarda y clasifica el contenido según tus preferencias.
La versión anterior de los clústeres conectados a GKE se conoce como clústeres conectados a GKE (generación anterior). Migrar de la versión anterior de clústeres conectados a GKE a la generación actual le permite acceder a esta funcionalidad, incluyendo la gestión del ciclo de vida y el registro de la flota. La migración es unidireccional: una vez migrada a la generación actual de clústeres conectados a GKE, no hay forma de volver a los clústeres conectados a GKE (generación anterior).
Política de numeración de versiones
Estos documentos se refieren a la versión de los clústeres conectados a GKE como la versión de la plataforma, para distinguirla de la versión de Kubernetes. Los clústeres conectados a GKE utilizan la misma convención de numeración de versiones que GKE; por ejemplo, 1.21.5-gke.1. Al conectar o actualizar su clúster, debe elegir una versión de la plataforma cuya versión secundaria sea igual o inferior a la versión de Kubernetes de su clúster. Por ejemplo, puede conectar un clúster con Kubernetes v1.22.* con clústeres conectados a GKE con la versión de la plataforma 1.21.* o 1.22.*.
Esto le permite actualizar su clúster a la próxima versión secundaria antes de actualizar los clústeres conectados a GKE.
Asegúrese de que la identidad de carga de trabajo esté habilitada
Los clústeres existentes de los clústeres conectados a GKE (generación anterior) deben tener habilitada la identidad de carga de trabajo antes de migrarlos a la generación actual de clústeres conectados a GKE.
Para determinar si WI está habilitado, ejecute el siguiente comando y verifique la salida de cualquier campo Identidad de carga de trabajo:
Si la Identidad de carga de trabajo no está habilitada, se debe actualizar la membresía para habilitarla.
El comando para actualizar la membresía de su clúster varía ligeramente según si este tiene un emisor OIDC público o privado. Seleccione la pestaña correspondiente a su clúster:
Ejecute el siguiente comando para migrar su clúster a la generación actual de clústeres conectados a GKE. Este comando extrae los detalles relevantes de la configuración de su clúster, lo registra en Google Fleet Management e instala o actualiza el software necesario, como el agente de ciclo de vida, en su clúster.
GOOGLE_CLOUD_REGION : la Google Cloud Ubicación desde la que se administra su clúster
FLEET_MEMBERSHIP : el designador de membresía completamente calificado de su clúster registrado (ver a continuación)
PLATFORM_VERSION : la versión de los clústeres adjuntos de GKE a los que desea migrar (ejemplo: v1.22.0-gke.1)
CLUSTER_DISTRIBUTION : el tipo de clúster: eks para Elastic Kubernetes Service de AWS, aks para Azure Kubernetes Service o generic para cualquier otra distribución
KUBECONFIG_CONTEXT : el nombre del contexto en su kubeconfig para conectarse a su clúster con
KUBECONFIG_PATH : la ubicación del archivo kubeconfig . Si no se especifica, el valor predeterminado es ~/.kube/config
El designador de membresía es una cadena que identifica de forma única su clúster adjunto y tiene el formato projects/ PROJECT_NUMBER /locations/global/memberships/ MEMBERSHIP_ID , donde
PROJECT_NUMBER es el número de proyecto de tu host de Fleet. Debes especificar el mismo número de proyecto al que pertenece actualmente tu clúster.
MEMBERSHIP_ID : debe ser el ID de membresía de la flota de su clúster existente. Los clústeres conectados a GKE usarán este valor como nombre de clúster.
[[["Es fácil de entender","easyToUnderstand","thumb-up"],["Me ofreció una solución al problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Es difícil de entender","hardToUnderstand","thumb-down"],["La información o el código de muestra no son correctos","incorrectInformationOrSampleCode","thumb-down"],["Me faltan las muestras o la información que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-06-12 (UTC)."],[],[],null,["# Migrate your CNCF conformant cluster\n\nThe predecessor version of GKE attached clusters is known as GKE attached clusters\n(previous generation). Migrating from the earlier\nversion of GKE attached clusters to the current generation gives you access to this\nfunctionality, including lifecycle management and Fleet registration. Migration\nis a one-way operation: once you have migrated to the current generation of\nGKE attached clusters, there is no way to return to GKE attached clusters (previous generation).\n\nVersion numbering policy\n------------------------\n\nThese documents refer to the GKE attached clusters version as the platform version,\nto distinguish it from the Kubernetes version. GKE attached clusters uses the same\nversion numbering convention as GKE - for example, 1.21.5-gke.1. When attaching\nor updating your cluster, you must choose a platform version whose minor version\nis the same as or one level below the Kubernetes version of your cluster. For\nexample, you can attach a cluster running Kubernetes v1.22.\\* with\nGKE attached clusters platform version 1.21.\\* or 1.22.\\*.\n\nThis lets you upgrade your cluster to the next minor version before upgrading\nGKE attached clusters.\n\nEnsure Workload Identity is enabled\n-----------------------------------\n\nExisting clusters from GKE attached clusters (previous generation) must have Workload\nIdentity enabled before being migrated to the current generation of GKE attached clusters.\n\nTo determine whether WI is enabled, run the following command and check\nthe output for any Workload Identity field: \n\n gcloud container hub memberships describe \u003cvar translate=\"no\"\u003eMEMBERSHIP_NAME\u003c/var\u003e\n\nIf Workload Identity is not enabled, the membership must be updated to enable it.\nThe command to update your cluster's membership varies slightly depending on whether your cluster has a public or private OIDC issuer. Choose the tab that applies to your cluster:\n\n\u003cbr /\u003e\n\n### Private OIDC issuer\n\n gcloud container hub memberships register \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eMEMBERSHIP_NAME\u003c/span\u003e\u003c/var\u003e \\\n --context=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eKUBECONFIG_CONTEXT\u003c/span\u003e\u003c/var\u003e \\\n --kubeconfig=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eKUBECONFIG_PATH\u003c/span\u003e\u003c/var\u003e \\\n --enable-workload-identity \\\n --has-private-issuer\n\nReplace:\n\n- \u003cvar translate=\"no\"\u003eMEMBERSHIP_NAME\u003c/var\u003e: the membership name of your cluster\n- \u003cvar translate=\"no\"\u003eKUBECONFIG_CONTEXT\u003c/var\u003e: context in the kubeconfig for accessing the AKS cluster\n- \u003cvar translate=\"no\"\u003eKUBECONFIG_PATH\u003c/var\u003e: path to your kubeconfig file\n\n### Public OIDC issuer\n\n- Retrieve your cluster's OIDC issuer URL. Specific instructions vary by distribution.\n\nThe output of this command will be the URL of your OIDC issuer. Save this value\nfor use later.\n\n- Update the membership:\n\n gcloud container fleet memberships register \u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eMEMBERSHIP_NAME\u003c/span\u003e\u003c/var\u003e \\\n --context=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eKUBECONFIG_CONTEXT\u003c/span\u003e\u003c/var\u003e \\\n --kubeconfig=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eKUBECONFIG_PATH\u003c/span\u003e\u003c/var\u003e \\\n --enable-workload-identity \\\n --public-issuer-url=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eOIDC_URL\u003c/span\u003e\u003c/var\u003e\n\nReplace:\n\n- \u003cvar translate=\"no\"\u003eMEMBERSHIP_NAME\u003c/var\u003e: the membership name of your cluster\n- \u003cvar translate=\"no\"\u003eKUBECONFIG_CONTEXT\u003c/var\u003e: context in the kubeconfig for accessing the AKS cluster\n- \u003cvar translate=\"no\"\u003eKUBECONFIG_PATH\u003c/var\u003e: path to your kubeconfig\n- \u003cvar translate=\"no\"\u003eOIDC_URL\u003c/var\u003e: the OIDC URL retrieved earlier\n\nMigrate your cluster\n--------------------\n\nTo migrate your cluster from GKE attached clusters (previous generation) to GKE attached clusters:\n\n1. Extract your cluster's kubeconfig context and store it in the\n KUBECONFIG_CONTEXT environment variable:\n\n KUBECONFIG_CONTEXT=$(kubectl config current-context)\n\n2. Run the following command to migrate your cluster to the current generation\n of GKE attached clusters. This command extracts the relevant details of your cluster's\n configuration and registers your cluster with Google Fleet Management, and\n installs or upgrades any necessary software, such as the lifecycle agent, on\n your cluster.\n\n gcloud container attached clusters import \\\n --location=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eGOOGLE_CLOUD_REGION\u003c/span\u003e\u003c/var\u003e \\\n --fleet-membership=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eFLEET_MEMBERSHIP\u003c/span\u003e\u003c/var\u003e \\\n --platform-version=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003ePLATFORM_VERSION\u003c/span\u003e\u003c/var\u003e \\\n --distribution=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eCLUSTER_DISTRIBUTION\u003c/span\u003e\u003c/var\u003e \\\n --context=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eKUBECONFIG_CONTEXT\u003c/span\u003e\u003c/var\u003e \\\n [--kubeconfig=\u003cvar translate=\"no\"\u003e\u003cspan class=\"devsite-syntax-n\"\u003eKUBECONFIG_PATH\u003c/span\u003e\u003c/var\u003e]\n\n Replace:\n - \u003cvar translate=\"no\"\u003eGOOGLE_CLOUD_REGION\u003c/var\u003e: the Google Cloud location from which your cluster is administered\n - \u003cvar translate=\"no\"\u003eFLEET_MEMBERSHIP\u003c/var\u003e: the fully qualified membership designator of your registered cluster (see below)\n - \u003cvar translate=\"no\"\u003ePLATFORM_VERSION\u003c/var\u003e: the version of GKE attached clusters that you want to migrate to (example: v1.22.0-gke.1)\n - \u003cvar translate=\"no\"\u003eCLUSTER_DISTRIBUTION\u003c/var\u003e: the cluster type - `eks` for AWS's Elastic Kubernetes Service, `aks` for Azure Kubernetes Service, or `generic` for any other distribution\n - \u003cvar translate=\"no\"\u003eKUBECONFIG_CONTEXT\u003c/var\u003e: the name of the context in your `kubeconfig` to connect to your cluster with\n - \u003cvar translate=\"no\"\u003eKUBECONFIG_PATH\u003c/var\u003e: the location of your `kubeconfig` file. If not specified, the default is `~/.kube/config`\n\n The membership designator is a string that uniquely identifies your attached\n cluster and has the form\n `projects/`\u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e`/locations/global/memberships/`\u003cvar translate=\"no\"\u003eMEMBERSHIP_ID\u003c/var\u003e,\n where\n - \u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e is your Fleet host project number. You must\n specify the same project number as one your cluster currently belongs to\n\n - \u003cvar translate=\"no\"\u003eMEMBERSHIP_ID\u003c/var\u003e: this must be the fleet membership ID of\n your existing cluster. GKE attached clusters will use this value as your\n cluster name."]]