GKE 연결 클러스터의 이전 버전을 GKE 연결 클러스터(이전 세대)라고 합니다. 이전 버전의 GKE 연결 클러스터에서 현재 세대로 마이그레이션하면 수명 주기 관리 및 Fleet 등록을 포함하여 이 기능에 액세스할 수 있습니다. 마이그레이션은 단방향 작업입니다. GKE 연결 클러스터의 현재 세대로 마이그레이션한 다음에는 GKE 연결 클러스터(이전 세대)로 돌아갈 방법이 없습니다.
버전 번호 지정 정책
이 문서에서는 Kubernetes 버전과 구분하기 위해 GKE 연결 클러스터 버전을 플랫폼 버전이라고 부릅니다. GKE 연결 클러스터는 1.21.5-gke.1과 같이 GKE와 동일한 버전 번호 지정 규칙을 따릅니다. 클러스터를 연결하거나 업데이트할 때는 부 버전이 클러스터의 Kubernetes 버전보다 한 단계 낮거나 동일한 플랫폼 버전을 선택해야 합니다. 예를 들어 Kubernetes v1.22.*를 실행하는 클러스터를 GKE 연결 클러스터 플랫폼 버전 1.21.* 또는 1.22.*와 연결할 수 있습니다.
이렇게 하면 GKE 연결 클러스터를 업그레이드하기 전에 다음 부 버전으로 클러스터를 업그레이드할 수 있습니다.
워크로드 아이덴티티가 사용 설정되어 있는지 확인
GKE 연결 클러스터(이전 세대)의 기존 클러스터가 현재 세대의 GKE 연결 클러스터로 마이그레이션되기 전 워크로드 아이덴티티가 사용 설정되어 있어야 합니다.
WI가 사용 설정되어 있는지 확인하려면 다음 명령어를 실행하고 워크로드 아이덴티티 필드의 출력을 확인합니다.
다음 명령어를 실행하여 클러스터를 GKE 연결 클러스터의 현재 세대로 마이그레이션합니다. 이 명령어는 클러스터 구성의 관련 세부정보를 추출하고 클러스터를 Google Fleet Management에 등록하고, 수명 주기 에이전트와 같은 모든 필수 소프트웨어를 클러스터에 설치하거나 업그레이드합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-31(UTC)"],[],[],null,["# Migrate your EKS attached 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.\n\n1. Retrieve your cluster's OIDC issuer URL with the following command:\n\n aws eks describe-cluster \\\n --region \u003cvar translate=\"no\"\u003eAWS_REGION\u003c/var\u003e \\\n --name \u003cvar translate=\"no\"\u003eCLUSTER_NAME\u003c/var\u003e \\\n --query \"cluster.identity.oidc.issuer\" \\\n --output text\n\n The output of this command will be the URL of your OIDC issuer. Save this value\n for use later.\n2. Update the membership:\n\n gcloud container fleet memberships register \u003cvar translate=\"no\"\u003eMEMBERSHIP_NAME\u003c/var\u003e \\\n --context=\u003cvar translate=\"no\"\u003eKUBECONFIG_CONTEXT\u003c/var\u003e \\\n --kubeconfig=\u003cvar translate=\"no\"\u003eKUBECONFIG_PATH\u003c/var\u003e \\\n --enable-workload-identity \\\n --public-issuer-url=\u003cvar translate=\"no\"\u003eOIDC_URL\u003c/var\u003e\n\n Replace:\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 EKS cluster\n - \u003cvar translate=\"no\"\u003eKUBECONFIG_PATH\u003c/var\u003e: path to your kubeconfig file\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."]]