Anwendungen in GKE-Clustern mit aarch64-, AMD64- oder gemischter Architektur bereitstellen
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Standardmäßig erkennt Skaffold automatisch die Architektur Ihres Zielclusters und erstellt ein Image, das der Architektur Ihrer Workstation entspricht, auch wenn die Architektur Ihres Zielclusters gemischt ist (x86 und Arm).
Sie haben auch die Möglichkeit, Ihrer skaffold.yaml-Datei einen Parameter hinzuzufügen, der angibt, für welche Plattform der Build ausgeführt werden soll. Dadurch wird die automatische Erkennung von Skaffold überschrieben.
Plattform für die Erstellung von Images angeben
Wenn Sie die automatische Erkennung von Skaffold beim Erstellen Ihres Images überschreiben möchten, können Sie in der Datei skaffold.yaml die Plattform angeben, für die Sie Images erstellen möchten.
In der folgenden Liste sind die möglichen Werte für das --platform-Flag in der Befehlszeile oder der platforms-Parameter in der skaffold.yaml-Datei aufgeführt:
x86
Arm
amd64
aarch64
linux/amd64
linux/aarch64
Fügen Sie der Datei „skaffold.yaml“ den Parameter „platforms“ hinzu.
Wenn Sie die Plattform angeben möchten, für die Sie das Image erstellen möchten, fügen Sie der skaffold.yaml-Datei den Parameter platforms hinzu:
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-09-05 (UTC)."],[[["\u003cp\u003eSkaffold automatically detects the target cluster's architecture and builds a matching image by default.\u003c/p\u003e\n"],["\u003cp\u003eYou can override Skaffold's automatic architecture detection by specifying the target platform in your \u003ccode\u003eskaffold.yaml\u003c/code\u003e file.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eplatforms\u003c/code\u003e parameter in the \u003ccode\u003eskaffold.yaml\u003c/code\u003e file allows you to set the desired architecture, using values such as \u003ccode\u003elinux/aarch64\u003c/code\u003e or \u003ccode\u003eamd64\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eplatforms\u003c/code\u003e parameter can be added to the build section of your \u003ccode\u003eskaffold.yaml\u003c/code\u003e file to customize the architecture of the built image.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eplatforms\u003c/code\u003e parameter can be specified either in your CLI using \u003ccode\u003e--platform\u003c/code\u003e, or by using \u003ccode\u003eplatforms\u003c/code\u003e inside your \u003ccode\u003eskaffold.yaml\u003c/code\u003e file.\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/shell/arm-support)."]]