本页面上的部分或全部信息可能不适用于 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 上提问。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-11。
[[["易于理解","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"]],["最后更新时间 (UTC):2025-08-11。"],[[["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\"]`."]]],[]]