Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Lingkungan eksekusi Cloud Deploy adalah lingkungan tempat Cloud Deploy menjalankan operasi render, pra-deployment, deployment, verifikasi, dan post-deployment. Lingkungan eksekusi terdiri dari komponen
berikut:
Kumpulan pekerja Cloud Build
(default atau pribadi) tempat Cloud Deploy menjalankan operasi render, pre-deployment, deployment, verifikasi, dan post-deployment
Akun layanan (default atau alternatif) yang memanggil Cloud Deploy untuk melakukan tindakan ini
Lokasi penyimpanan (default atau alternatif) untuk manifes yang dirender di
Cloud Storage
Waktu tunggu Cloud Build untuk operasi (default atau kustom)
Artikel ini menjelaskan lingkungan eksekusi, akun layanan, dan penyimpanan default untuk Cloud Deploy, serta alasan dan cara mengubah default ini.
Default
Berikut adalah setelan default yang digunakan Cloud Deploy untuk dijalankan, untuk menjalankan rendering dan deployment, serta untuk menyimpan aset seperti manifes yang dirender:
Nilai ini adalah bucket Cloud Storage tempat Cloud Deploy
menyimpan manifes yang dirender. Secara default, Cloud Deploy membuat
bucket Cloud Storage, di region yang sama
dengan resource Cloud Deploy, dengan bentuk berikut:
Secara default, Cloud Build memiliki waktu tunggu 1 jam pada operasi yang dilakukannya untuk Cloud Deploy. Anda dapat mengubah waktu tunggu tersebut di
spesifikasi lingkungan eksekusi di
konfigurasi target.
Panjang teks default untuk Skaffold, gcloud CLI, dan kubectl
Secara default, level log untuk alat ini ditetapkan ke setelan defaultnya masing-masing,
biasanya warn atau yang setara. Anda dapat mengubahnya
menjadi debug atau yang setara.
Bagian berikut menjelaskan situasi saat Anda akan mengubah
salah satu nilai ini, dan link ke petunjuk untuk melakukannya.
Tentang kumpulan pekerja Cloud Build
Lingkungan eksekusi Cloud Deploy dapat menggunakan salah satu dari berikut:
Kumpulan pekerja default adalah lingkungan terhosting dan aman dengan akses ke internet publik. Operasi render, deployment, pra-deployment, pasca-deployment, dan verifikasi
dijalankan di kumpulan tersebut, yang diisolasi dari beban kerja lain.
Kumpulan pribadi
Kumpulan pekerja pribadi adalah kumpulan khusus dan pribadi yang dapat disesuaikan lebih dari kumpulan pekerja default. Penyesuaian tersebut dapat mencakup kemampuan untuk mengakses resource di
jaringan pribadi. Seperti kumpulan pekerja default, kumpulan pekerja pribadi dihosting dan dikelola sepenuhnya oleh Cloud Build. Kumpulan ini dapat ditingkatkan atau diturunkan skalanya hingga nol, tanpa infrastruktur untuk disiapkan, diupgrade, atau diskalakan.
Ringkasan kumpulan pribadi Cloud Build
menjelaskan kumpulan pekerja default dan kumpulan pekerja pribadi secara lebih menyeluruh,
termasuk tabel yang membandingkan fiturnya.
Mengubah lingkungan eksekusi Cloud Deploy
Anda dapat mengubah lingkungan eksekusi Cloud Deploy dalam keadaan berikut:
Anda ingin merender, men-deploy, melakukan pra-deployment, pasca-deployment, atau memverifikasi operasi, atau
kombinasi dari kelimanya, yang dilakukan di lingkungan yang terisolasi dari
organisasi lain.
Anda ingin operasi ini dilakukan di lingkungan yang tidak
terhubung ke internet publik.
Anda menginginkan lingkungan terpisah untuk rendering dan deployment.
Anda ingin menggunakan akun layanan khusus dengan izin yang lebih
spesifik untuk penggunaan Anda daripada izin yang tersedia di akun layanan
default.
Anda ingin menyimpan manifes yang dirender di lokasi yang berbeda dengan bucket Cloud Storage default.
Konfigurasi ketiga bagian lingkungan eksekusi (kumpulan pekerja, akun
layanan, dan penyimpanan) dilakukan per target, dalam konfigurasi YAML setiap target.
Beralih dari kumpulan default ke kumpulan pribadi
Anda mengonfigurasi kumpulan pekerja per target,
sehingga kumpulan tersebut digunakan untuk RENDER, DEPLOY, PREDEPLOY, POSTDEPLOY, atau
VERIFY (atau kombinasi dari kelimanya) hanya untuk target tersebut.
Untuk menggunakan kumpulan pekerja default untuk operasi rendering dan deployment, Anda tidak perlu melakukan apa pun.
Berikut adalah contoh konfigurasi target yang menentukan kumpulan pekerja
pribadi untuk DEPLOY, dan kumpulan pekerja default untuk RENDER, PREDEPLOY,
POSTDEPLOY, dan VERIFY:
Beralih dari akun layanan eksekusi default ke kustom
Seperti kumpulan pekerja, Anda dapat menentukan akun layanan alternatif yang akan digunakan untuk
merender atau men-deploy (atau keduanya) per target. Untuk melakukannya, tambahkan baris berikut ke
konfigurasi target, setelah elemen workerPool:
Mengubah level log untuk Skaffold, gcloud CLI, dan kubectl
Untuk mengubah level log untuk Skaffold, gcloud CLI, dan kubectl, dari default masing-masing ke debug (atau yang setara), tetapkan verbose ke true dalam konfigurasi eksekusi. Berikut contohnya:
Anda harus menggunakan kumpulan pekerja pribadi Cloud Build untuk lingkungan eksekusi target, bukan kumpulan pekerja default.
Project yang berisi kumpulan pekerja dan project yang berisi resource Cloud Deploy Anda harus tetap berada dalam perimeter keamanan Kontrol Layanan VPC yang sama.
Setiap cluster GKE yang Anda deploy di perimeter Kontrol Layanan VPC harus berupa cluster pribadi.
Untuk menyiapkan kumpulan pribadi bagi cluster pribadi, lihat tutorial ini.
[[["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's execution environment includes a Cloud Build worker pool, a service account, a storage location for rendered manifests, and a Cloud Build timeout, all of which have default settings.\u003c/p\u003e\n"],["\u003cp\u003eThe default Cloud Deploy settings use the default Cloud Build worker pool, the default Compute Engine service account, a Cloud Storage bucket for rendered manifests in the same region as the Cloud Deploy resources, and a one-hour Cloud Build timeout.\u003c/p\u003e\n"],["\u003cp\u003eYou can customize the Cloud Deploy execution environment per target, such as switching to a private Cloud Build worker pool, using a dedicated service account, or specifying a different Cloud Storage bucket for rendered manifests.\u003c/p\u003e\n"],["\u003cp\u003eChanging the execution environment is useful for deploying to private Google Kubernetes Engine clusters, isolating operations, or using dedicated service accounts with specific permissions.\u003c/p\u003e\n"],["\u003cp\u003eCloud Deploy can be configured to use a VPC Service Controls perimeter, but it requires a Cloud Build private worker pool and that the worker pool and the Cloud Deploy project be within the same security perimeter.\u003c/p\u003e\n"]]],[],null,["# Using Cloud Deploy execution environments\n\nA Cloud Deploy execution environment is the environment in which\nCloud Deploy executes its render, predeploy, deploy, verify, and\npostdeploy operations. The execution environment consists of the following\ncomponents:\n\n- The [Cloud Build worker pool](/build/docs/private-pools/private-pools-overview)\n (default or private) in which Cloud Deploy executes render,\n predeploy, deploy, verify, and postdeploy operations\n\n- The service account (default or alternate) that calls Cloud Deploy\n to perform these actions\n\n- The storage location (default or alternate) for rendered manifests in\n Cloud Storage\n\n- The Cloud Build timeout for operations (default or custom)\n\nThis article describes the default execution environment, service accounts, and\nstorage for Cloud Deploy, as well as why and how you can change these\ndefaults.\n\nDefaults\n--------\n\nThe following are the defaults that Cloud Deploy uses to run, to\nexecute rendering and deployment, and to store assets such as rendered manifests:\n\n- Default worker pool\n\n By default, Cloud Deploy runs in the default Cloud Build\n worker pool. However, you can [configure Cloud Deploy to use a Cloud Build\n private worker pool](/deploy/docs/config-files#executionconfigs).\n\n For more details about worker pools, see the Cloud Build\n [Overview of default pools and private pools](/build/docs/private-pools/private-pools-overview#overview_of_default_pools_and_private_pools).\n- Default execution service account\n\n By default, Cloud Deploy uses the [default Compute Engine\n service account](/deploy/docs/cloud-deploy-service-account#default_service_account).\n- Default Cloud Deploy storage location\n\n This value is the Cloud Storage bucket where Cloud Deploy\n stores your rendered manifests. By default, Cloud Deploy creates\n a Cloud Storage bucket, in the same [region](/deploy/docs/regions)\n as the Cloud Deploy resources, taking the following form:\n\n `\u003clocation\u003e.deploy-artifacts.\u003cproject ID\u003e.appspot.com`\n- Default Cloud Build timeout\n\n By default, Cloud Build has a timeout of 1 hour on operations it\n performs for Cloud Deploy. You can change that timeout in the\n execution environment specification in\n [target configuration](/deploy/docs/config-files#executionconfigs).\n- Default verbosity for Skaffold, gcloud CLI, and kubectl\n\n By default, log levels for these tools are set to their respective defaults,\n typically `warn` or the equivalent. You can [change this](#changing_log_level)\n to `debug` or the equivalent.\n\nThe sections that follow describe the circumstances under which you would change\nany of these values, and links to instructions for doing so.\n\nAbout Cloud Build worker pools\n------------------------------\n\nThe Cloud Deploy execution environment can use one of the following:\n\n- The [Cloud Build default pool](/build/docs/private-pools/private-pools-overview)\n\n The default worker pool is a secure, hosted environment with access to the\n public internet. Render, deploy, predeploy, postdeploy, and verify operations\n are executed in that pool, isolated from other workloads.\n- A private pool\n\n [Private worker pools](/build/docs/private-pools/private-pools-overview) are\n private, dedicated pools that can be customized more than the default worker\n pool. That customization can include the ability to access resources in a\n private network. Like the default worker pool, private worker pools are hosted\n and fully managed by Cloud Build. These pools can scale up or\n scale down to zero, with no infrastructure to set up, upgrade, or scale.\n\n The Cloud Build [Private pools overview](/build/docs/private-pools/private-pools-overview)\n describes default worker pools and private worker pools more thoroughly,\n including a table comparing their features.\n\n| **Note:** Cloud Build private worker pools are regional resources. Cloud Deploy lets you configure [targets](/deploy/docs/terminology#target) with private pools in other regions. This configuration makes it possible to share private worker pools among targets, and allows cross-regional dependencies.\n\nChanging the Cloud Deploy execution environment\n-----------------------------------------------\n\nYou might change the Cloud Deploy execution environment under the\nfollowing circumstances:\n\n- You want to [deploy to a private Google Kubernetes Engine cluster](/build/docs/private-pools/use-in-private-network#deploying-to-clusters)\n\n- You want render, deploy, predeploy, postdeploy, or verify operations, or a\n combination of the five, to be performed in an environment that's isolated from\n other organizations.\n\n- You want these operations to be performed in an environment that isn't\n connected to the public internet.\n\n- You want separate environments for render and deploy.\n\n- You want to use a dedicated service account with permissions that are more\n specific to your use than the permissions available in the default service\n account.\n\n- You want to store rendered manifests in a location different from the default\n Cloud Storage bucket.\n\nConfiguration of all three parts of the execution environment (worker pool, service\naccount, and storage) is done per target, in [each target's YAML configuration](/deploy/docs/config-files#target_definitions).\n\n### Changing from the default pool to a private pool\n\nYou configure worker pools [per target](/deploy/docs/config-files#target_definitions),\nso that the pool is used for `RENDER`, `DEPLOY`, `PREDEPLOY`, `POSTDEPLOY`, or\n`VERIFY` (or a combination of the five) *for that target only*.\n\nTo use the default worker pool for both render and deploy operations, you don't\nneed to do anything.\n| **Note:** if you want to configure a target to use a private worker pool for either operation (`RENDER` or `DEPLOY`), but the default worker pool for the other, you must configure both. That is, you can't specify a private worker pool for `DEPLOY` but assume Cloud Deploy will perform rendering in the default pool.\n\nThe following is a sample target configuration that specifies a private worker\npool for `DEPLOY`, and the default worker pool for `RENDER`, `PREDEPLOY`,\n`POSTDEPLOY` and `VERIFY`: \n\n executionConfigs:\n - usages:\n - DEPLOY\n privatePool:\n workerPool: \"projects/p123/locations/us-central1/workerPools/wp123\"\n - usages:\n - RENDER\n - PREDEPLOY\n - VERIFY\n - POSTDEPLOY\n\n| **Note:** if Cloud Deploy is running in a different project from the worker pool's project, make sure the [service agent](/deploy/docs/cloud-deploy-service-account#service_agent) has permission on the worker pool in that project. You can use either the `roles/cloudbuild.workerPoolUser` role or the `cloudbuild.workerpools.use` direct permission.\n\nFor more information about how to configure private pools for targets, see\n[Delivery pipeline configuration documentation](/deploy/docs/config-files#executionconfigs).\n\n### Changing from the default to custom execution service account\n\nAs with the worker pool, you can specify an alternate service account to use for\nrendering or deploying (or both) per target. To do so, add the following line to\nthe target configuration, after the `workerPool` element:\n\n`serviceAccount: \"[name]@[project_name].iam.gserviceaccount.com\"`\n\nThe specified service account must include the `clouddeploy.jobRunner` role, as\ndescribed in the [Cloud Deploy service accounts](/deploy/docs/cloud-deploy-service-account)\ndocument.\n\nSee [Target definitions](/deploy/docs/config-files#target_definitions) for more\ndetails on this configuration.\n\n### Changing the storage location\n\nTo change the storage bucket from the Cloud Deploy default, add the\nfollowing line to the [target definition](/deploy/docs/config-files#target_definitions)\nin the `workerPool` stanza:\n\n`artifactStorage: \"gs://[bucket_name]/[dir]\"`\n\nThis configuration changes where the rendered manifests are stored, but does not\naffect [where the rendering source is stored](/sdk/gcloud/reference/deploy/releases/create#--source).\n\n### Changing the log level for Skaffold, gcloud CLI, and kubectl\n\nTo change the log level for Skaffold, gcloud CLI, and kubectl, from\ntheir respective defaults to `debug` (or the equivalent), set `verbose` to\n`true` in the execution configs. Here's an example: \n\n executionConfigs:\n - usages:\n - [RENDER | PREDEPLOY| DEPLOY | VERIFY | POSTDEPLOY]\n workerPool:\n serviceAccount:\n artifactStorage:\n executionTimeout:\n verbose: true\n\nUsing Cloud Deploy in a VPC Service Controls perimeter\n------------------------------------------------------\n\nCloud Deploy supports [VPC Service Controls](/vpc-service-controls).\n\nYou can follow the [VPC Service Controls quickstart](/vpc-service-controls/docs/set-up-service-perimeter)\nto set up a service perimeter.\n\n### Limitations\n\n- You must use a Cloud Build private worker pool for the target's\n execution environment---not the default worker pool.\n\n- The project that contains the worker pool and the project that contains your\n Cloud Deploy resources must remain in the same VPC Service Controls\n security perimeter.\n\n- Any GKE cluster you deploy to in the\n VPC Service Controls perimeter must be a private cluster.\n\n To set up a private pool for a private cluster, see [this tutorial](https://cloud.google.com/architecture/accessing-private-gke-clusters-with-cloud-build-private-pools).\n\nWhat's next\n-----------\n\n- Find out more about [Cloud Deploy target configuration](/deploy/docs/config-files#target_definitions).\n\n- Read about [Cloud Build private pools](/build/docs/private-pools/private-pools-overview).\n\n- Read about [how Cloud Build uses VPC Service Controls](/build/docs/private-pools/using-vpc-service-controls).\n\n- Learn about how Cloud Deploy uses [service accounts](/deploy/docs/cloud-deploy-service-account).\n\n- [Access private GKE clusters with Cloud Build private pools](/architecture/accessing-private-gke-clusters-with-cloud-build-private-pools)."]]