Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Dokumen ini menjelaskan cara men-deploy aplikasi ke
cluster GKE Enterprise. Dukungan untuk
target GKE Enterprise memungkinkan deployment ke cluster AWS, Azure, dan lokal.
Cloud Deploy memungkinkan Anda men-deploy beban kerja berbasis penampung ke
cluster pengguna GKE Enterprise yang dapat Anda akses menggunakan
gateway Connect.
Sebelum memulai
Memiliki cluster pengguna GKE Enterprise yang akan Anda deploy.
Cluster ini dapat berupa cluster yang Anda buat sebagai cluster pengguna GKE Enterprise, atau Anda dapat mendaftarkan cluster Kubernetes yang ada.
Cluster yang Anda buat untuk GKE Enterprise akan otomatis menerima
keanggotaan. Untuk cluster yang ada yang Anda daftarkan ke fleet, Anda harus menetapkan nama keanggotaan saat mendaftar. Anda memerlukan nama keanggotaan ini untuk konfigurasi target.
Jika menggunakan Google Cloud CLI versi 407.0.0 atau yang lebih baru, Anda harus menyertakan flag --install-connect-agent pada perintah gcloud container fleet memberships register saat mendaftarkan cluster Google Kubernetes Engine. Agen Connect tidak lagi
diinstal secara default.
Siapkan Connect gateway untuk menghubungkan satu atau beberapa cluster terdaftar ke Google Cloud.
Pastikan untuk menyiapkan gateway menggunakan akun layanan yang sama dengan yang akan digunakan sebagai akun layanan eksekusi Cloud Deploy. Jika tidak, akun layanan eksekusi
tidak akan memiliki izin yang diperlukan untuk di-deploy ke
cluster GKE Enterprise.
Menyiapkan Cloud Deploy untuk di-deploy ke GKE Enterprise
Target dapat dikonfigurasi di YAML pipeline pengiriman, atau dapat berada dalam file terpisah. Selain itu, Anda dapat mengonfigurasi lebih dari satu target dalam file yang sama, tetapi target tersebut harus berada dalam stanza kind: Target yang berbeda.
Opsional: jika cluster yang mendasarinya bukan cluster GKE, Anda mungkin perlu mengonfigurasi imagePullSecret untuk mengizinkan cluster menarik dari Artifact Registry.
Dalam definisi target, buat stanza anthosCluster untuk mengarah ke
cluster GKE Enterprise:
Sintaksis untuk menentukan cluster GKE Enterprise adalah sebagai berikut:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-17 UTC."],[[["\u003cp\u003eCloud Deploy facilitates the deployment of container-based workloads to any GKE Enterprise user cluster accessible via Connect gateway, including AWS, Azure, and on-premises clusters.\u003c/p\u003e\n"],["\u003cp\u003eTo prepare for deployment, you must have a GKE Enterprise user cluster, which can be a newly created or registered existing Kubernetes cluster, and have Connect gateway configured.\u003c/p\u003e\n"],["\u003cp\u003eThe execution service account needs to be granted the necessary roles to interact with connected clusters through the gateway, whether using the default Cloud Deploy service account or a custom one.\u003c/p\u003e\n"],["\u003cp\u003eTarget configuration, which can be defined within the delivery pipeline YAML or in a separate file, must include an \u003ccode\u003eanthosCluster\u003c/code\u003e stanza that specifies the GKE Enterprise cluster membership using its project name, membership name, and \u003ccode\u003eglobal\u003c/code\u003e location.\u003c/p\u003e\n"],["\u003cp\u003eIn order to set up Connect gateway you will need to enable Workload Identity on the GKE clusters.\u003c/p\u003e\n"]]],[],null,["# Deploy to GKE Enterprise user clusters\n\nThis document describes how to deploy your applications to\n[GKE Enterprise clusters](/anthos/clusters/docs). Support for\nGKE Enterprise targets enables deployment to AWS, Azure, and on-premises\nclusters.\n\nCloud Deploy lets you deploy your container-based workloads to any\nGKE Enterprise user cluster that you can access using\n[Connect](/anthos/multicluster-management/gateway/using) gateway.\n\nBefore you begin\n----------------\n\n- Have a GKE Enterprise user cluster that you will deploy to.\n\n This cluster can be one which you created as an GKE Enterprise user\n cluster, or you can\n [register an existing Kubernetes cluster](/anthos/multicluster-management/connect/registering-a-cluster).\n Clusters which you create for GKE Enterprise automatically receive\n memberships. For existing clusters which you\n [register to a fleet](/anthos/multicluster-management/fleets), you\n designate a membership name when registering. You will need this membership\n name for the target configuration.\n\n If you're using Google Cloud CLI version 407.0.0 or newer, you need to\n include the `--install-connect-agent` flag on the\n [`gcloud container fleet memberships register` command](https://cloud.google.com/sdk/gcloud/reference/container/fleet/memberships/register),\n when you register a Google Kubernetes Engine cluster. The Connect agent is no longer\n installed by default.\n- Set up [Connect gateway](/anthos/multicluster-management/gateway/setup) to\n connect the registered cluster or clusters to Google Cloud.\n\n Be sure to set up the gateway using the same service account that will be used\n as the [Cloud Deploy execution service account](/deploy/docs/cloud-deploy-service-account#execution_service_account). If you don't, then the execution service\n account won't have the necessary permissions to deploy to the\n GKE Enterprise cluster.\n | **Note:** Enable [Workload Identity](/kubernetes-engine/docs/how-to/workload-identity) on the GKE clusters in order to set up Connect gateway.\n\nSet up your Cloud Deploy to deploy to GKE Enterprise\n----------------------------------------------------\n\n1. Create your [target configuration](/deploy/docs/config-files).\n\n The target can be configured in your delivery pipeline YAML, or can be in a\n separate file. Also, you can configure more than one target in the same file,\n but they must be in different `kind: Target` stanzas.\n2. Grant the [execution service account](/deploy/docs/execution-environment)\n the [roles that it needs](/anthos/multicluster-management/gateway/setup#grant_roles_to_users)\n so that it can interact with connected clusters through the gateway.\n\n This grant is necessary whether you're using the default Cloud Deploy\n service account or a [custom service account](/deploy/docs/execution-environment#changing_from_the_default_to_custom_execution_service_account).\n3. [Set up RBAC](/anthos/multicluster-management/gateway/setup#configure_role-based_access_control_rbac_policies) for the [execution service account](/deploy/docs/execution-environment) on the Kubernetes cluster that underlies the\n Anthos cluster.\n\n4. Optional: if the underlying cluster is not a GKE\n cluster, you might need to [configure an imagePullSecret](/artifact-registry/docs/access-control#pullsecrets)\n to allow your cluster to pull from Artifact Registry.\n\n5. In the target definition, create an `anthosCluster` stanza to point to the\n GKE Enterprise cluster:\n\n The syntax for specifying an GKE Enterprise cluster is as follows: \n\n anthosCluster:\n membership: projects/[project_name]/locations/global/memberships/[membership_name]\n\n This GKE Enterprise resource identifier uses the following elements:\n - \\[`project_name`\\] is the name of the Google Cloud project in which\n you're running this cluster.\n\n The cluster you're deploying to, including GKE Enterprise\n clusters, does *not* need to be in the same project as your delivery\n pipeline.\n - \\[`membership_name`\\] is the name that you chose when\n [registering the cluster](/anthos/multicluster-management/connect/registering-a-cluster)\n to a fleet.\n\n For `location`, all GKE Enterprise cluster memberships are `global`,\n so you don't need to change `/locations/global/` in this resource identifier.\n\nThe following is an example target configuration, pointing to an GKE Enterprise\nuser cluster: \n\n apiVersion: deploy.cloud.google.com/v1\n kind: Target\n metadata:\n name: qsdev\n description: development cluster\n anthosCluster:\n membership: projects/my-app/locations/global/memberships/my-app-dev-cluster\n\nWhat's next\n-----------\n\n- Learn more about [configuring Cloud Deploy targets](/deploy/docs/config-files#target_definitions)\n\n- Learn about Cloud Deploy [execution environments](/deploy/docs/execution-environment).\n\n- Learn more about [GKE Enterprise](/anthos/docs)\n\n- Learn more about [Connect gateway](/anthos/multicluster-management/gateway)."]]