Men-deploy aplikasi ke cluster GKE aarch64, AMD64, atau campuran arsitektur
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Secara default, Skaffold secara otomatis mendeteksi
arsitektur cluster target dan mem-build image yang cocok dengan
arsitektur workstation, meskipun arsitektur cluster target Anda campuran
(x86 dan Arm).
Anda juga memiliki opsi untuk menambahkan parameter dalam
file skaffold.yaml yang menentukan platform yang akan dibuat, yang akan mengganti
deteksi otomatis Skaffold.
Menentukan platform untuk mem-build image
Jika ingin mengganti deteksi otomatis Skaffold saat mem-build image,
Anda dapat menentukan platform yang ingin digunakan untuk mem-build image dalam
file skaffold.yaml.
Daftar berikut menunjukkan kemungkinan nilai untuk
tanda --platform di CLI, atau parameter platforms di
file skaffold.yaml:
x86
Arm
amd64
aarch64
linux/amd64
linux/aarch64
Menambahkan parameter platform ke file skaffold.yaml
Untuk menentukan platform yang ingin Anda buat image-nya, tambahkan parameter platforms ke file skaffold.yaml:
[[["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-09-04 UTC."],[[["\u003cp\u003eSkaffold automatically detects the target cluster's architecture and builds a matching image, even in mixed-architecture environments.\u003c/p\u003e\n"],["\u003cp\u003eYou can override Skaffold's automatic detection by specifying the desired platform using the \u003ccode\u003eplatforms\u003c/code\u003e parameter in your \u003ccode\u003eskaffold.yaml\u003c/code\u003e file.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eplatforms\u003c/code\u003e parameter in \u003ccode\u003eskaffold.yaml\u003c/code\u003e or the \u003ccode\u003e--platform\u003c/code\u003e flag in the CLI can use values like \u003ccode\u003eamd64\u003c/code\u003e, \u003ccode\u003elinux/amd64\u003c/code\u003e, \u003ccode\u003eaarch64\u003c/code\u003e, or \u003ccode\u003elinux/aarch64\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eTo specify the platform, add a \u003ccode\u003eplatforms\u003c/code\u003e section to your \u003ccode\u003eskaffold.yaml\u003c/code\u003e file under the \u003ccode\u003ebuild\u003c/code\u003e section, with an array of desired values, such as \u003ccode\u003eplatforms: ["linux/aarch64"]\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Deploy your applications to aarch64, AMD64, or mixed-architecture GKE clusters\n\nBy default, [Skaffold](https://cloud.google.com/skaffold) automatically detects\nyour target cluster's architecture and builds an image that matches your\nworkstation's architecture, even if your target cluster's architecture is mixed\n(both x86 and Arm).\n\nYou also have the option to add a parameter in your\n`skaffold.yaml` file that specifies what platform to build for, which overrides\nSkaffold's automatic detection.\n\nSpecify the platform to build images for\n----------------------------------------\n\nIf you want to override Skaffold's automatic detection when building your image,\nyou can specify the platform that you want to build images for in\nyour `skaffold.yaml`\nfile.\n\nThe following list shows the possible values for the\n`--platform` flag in your CLI, or the `platforms` parameter in\nyour `skaffold.yaml` file:\n\n### Add the platforms parameter to your skaffold.yaml file\n\nTo specify the platform you want to build your image for, add the `platforms`\nparameter to your `skaffold.yaml` file: \n\n build:\n platforms: [\"linux/aarch64\"]\n artifacts:\n - image: example\n\nTo learn more about Cloud Code's support for Arm and\nmixed-architecture GKE clusters, see\n[Arm support](/code/docs/vscode/arm-support).\n\n\nGet Support\n-----------\n\nTo send feedback, report issues on [GitHub](https://github.com/GoogleCloudPlatform/cloud-code-vscode/issues), or ask a question on [Stack Overflow](https://stackoverflow.com/questions/ask?tags=cloud-code-vscode)."]]