本頁面中的部分或全部資訊可能不適用於 Trusted Cloud by S3NS。
將應用程式部署至 aarch64、AMD64 或混合架構的 GKE 叢集
根據預設,Skaffold 會自動偵測目標叢集的架構,並建構與工作站架構相符的映像檔,即使目標叢集的架構是混合型 (x86 和 Arm) 也一樣。
您也可以選擇在 skaffold.yaml
檔案中新增參數,指定要針對哪個平台進行建構,這樣做可覆寫 Skaffold 的自動偵測功能。
如果您想在建構映像檔時覆寫 Skaffold 的自動偵測功能,可以在 skaffold.yaml
檔案中指定要為哪個平台建構映像檔。
以下清單列出 CLI 中 --platform
標記的可能值,或 skaffold.yaml
檔案中的 platforms
參數:
x86 |
Arm |
amd64 |
aarch64 |
linux/amd64 |
linux/aarch64 |
如要指定要為哪個平台建構映像檔,請將 platforms
參數新增至 skaffold.yaml
檔案:
build:
platforms: ["linux/aarch64"]
artifacts:
- image: example
如要進一步瞭解 Cloud Code 支援的 Arm 和混合架構 GKE 叢集,請參閱「Arm 支援」。
取得支援
如要提供意見回饋,請前往
GitHub 回報問題,或在
Stack Overflow 上提問。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-15 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-15 (世界標準時間)。"],[[["Skaffold automatically detects the target cluster's architecture and builds a matching image, even in mixed-architecture environments."],["You can override Skaffold's automatic detection by specifying the desired platform using the `platforms` parameter in your `skaffold.yaml` file."],["The `platforms` parameter in `skaffold.yaml` or the `--platform` flag in the CLI can use values like `amd64`, `linux/amd64`, `aarch64`, or `linux/aarch64`."],["To specify the platform, add a `platforms` section to your `skaffold.yaml` file under the `build` section, with an array of desired values, such as `platforms: [\"linux/aarch64\"]`."]]],[]]