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 (sowohl x86 als auch Arm).
Sie haben auch die Möglichkeit, in Ihrer IDE eine Umgebungsvariable oder in 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 die Plattform, für die Sie Images erstellen möchten, auf folgende Weise angeben:
In der folgenden Liste sind die möglichen Werte für die Umgebungsvariable SKAFFOLD_PLATFORM im Feld Umgebungsvariablen Ihrer IDE aufgeführt. Sie können diese Werte auch für das Flag --platform in der Befehlszeile oder den Parameter platforms in der Datei skaffold.yaml verwenden:
x86
Arm
amd64
aarch64
linux/amd64
linux/aarch64
Umgebungsvariablen zu den Konfigurationen Ihrer IDE hinzufügen
So fügen Sie den Cloud Code-Konfigurationen Umgebungsvariablen hinzu:
Klicken Sie in Ihrer IDE auf Ausführen > Konfigurationen bearbeiten.
Geben Sie auf dem Tab Ausführen unter dem Snippet Erweiterte Einstellungen Ihre Umgebungsvariable in das Feld Umgebungsvariablen ein.
Beispiel: SKAFFOLD_PLATFORM=linux/aarch64
Dadurch wird die automatische Erkennung von Skaffold überschrieben und der von Ihnen angegebene Imagetyp wird erstellt. Ihre skaffold.yaml-Datei bleibt unverändert.
Parameter „platforms“ zur Datei „skaffold.yaml“ hinzufügen
Wenn Sie die Plattform angeben möchten, für die Sie Ihr Image erstellen möchten, fügen Sie den Parameter platforms in Ihre skaffold.yaml-Datei ein:
Weitere Informationen zur Unterstützung von Arm und GKE-Clustern mit gemischter Architektur in Cloud Code finden Sie unter Arm-Unterstützung.
Support anfordern
So senden Sie Feedback oder melden ein Problem in Ihrer IntelliJ-IDE: Tools > Cloud Code > Hilfe / Info > Feedback geben oder Problem melden, um ein Problem auf GitHub zu melden.
[[["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-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 architecture detection by using the \u003ccode\u003eSKAFFOLD_PLATFORM\u003c/code\u003e environment variable in your IDE configurations.\u003c/p\u003e\n"],["\u003cp\u003eAlternatively, you can specify the build platform directly in your \u003ccode\u003eskaffold.yaml\u003c/code\u003e file using the \u003ccode\u003eplatforms\u003c/code\u003e parameter.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSKAFFOLD_PLATFORM\u003c/code\u003e environment variable, \u003ccode\u003e--platform\u003c/code\u003e flag, or \u003ccode\u003eplatforms\u003c/code\u003e parameter can be set to 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 to define the desired architecture.\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 an\nenvironment variable in your IDE or 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\nthe following ways:\n\n- [Add the `SKAFFOLD_PLATFORM` environment variable to your IDE's configurations](#add_environment_variables_to_your_ides_configurations).\n- [Add the `platforms` parameter to your `skaffold.yaml` file](#add_the_platforms_parameter_to_your_skaffoldyaml_file).\n\nThe following list shows the possible values for the\n`SKAFFOLD_PLATFORM` environment variable in\nyour IDE's **Environment variables** field. You can also use these values for\nthe `--platform` flag in your CLI, or the `platforms` parameter in\nyour `skaffold.yaml` file:\n\n### Add environment variables to your IDE's configurations\n\nTo add environment variables to Cloud Code's configurations,\nfollow these steps:\n\n1. In your IDE, click **Run** \\\u003e **Edit Configurations**.\n\n2. In the **Run** tab, under the **Advanced Settings** snippet, enter your\n environment variable in the **Environment variables** field.\n\n For example: `SKAFFOLD_PLATFORM=linux/aarch64`\n\n This overrides Skaffold's automatic detection and builds the image type that\n you specified. Your `skaffold.yaml` file remains unchanged.\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/intellij/arm-support).\n\n\nGet support\n-----------\n\nTo submit feedback or report an issue in your IntelliJ IDE, go to **Tools** \\\u003e **Cloud Code** \\\u003e **Help / About** \\\u003e **Submit\nfeedback or report an issue** to report an issue on [GitHub](https://github.com/GoogleCloudPlatform/cloud-code-intellij/issues)."]]