GKE-Cluster in Cloud Code for IntelliJ konfigurieren
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
Mit Cloud Code können Sie einen Kubernetes-Cluster mit Google Kubernetes Engine (GKE) erstellen.
.
GKE-Cluster erstellen und zur KubeConfig hinzufügen
Cloud Code öffnet die Google Cloud Console, damit Sie schnell einen Cluster erstellen können:
Klicken Sie zum Öffnen des Kubernetes Explorers auf Kubernetes Explorer oder rufen Sie Tools > Cloud Code > Kubernetes > Cluster-Explorer ansehen auf.
Klicken Sie im Header des Bereichs „Kubernetes Explorer“ auf + Mit einem GKE-Cluster verbinden.
Wählen Sie Neuen GKE-Cluster erstellen oder Neuen GKE Autopilot-Cluster erstellen aus. Weitere Informationen dazu, welcher Modus der richtige ist, finden Sie unter Autopilot- und Standardmodi vergleichen.
Wenn Sie dazu aufgefordert werden, klicken Sie auf Öffnen, damit Cloud Code dieGoogle Cloud -Konsole öffnen kann.
Wählen Sie in der Google Cloud -Konsole alle Konfigurationsoptionen aus, die Sie anpassen möchten, und klicken Sie dann auf Erstellen.
Klicken Sie nach dem Erstellen des Clusters in Cloud Code im Kubernetes Explorer auf das Symbol Aktualisieren.
Wenn der Name des neuen Clusters in der Liste angezeigt wird, klicken Sie auf den Clusternamen. Der neue Cluster wird der Konfiguration hinzugefügt und als Standardkontext festgelegt.
Mit einem vorhandenen GKE-Cluster arbeiten
Wenn Sie bereits einen Standard- oder Autopilot-GKE-Cluster haben, können Sie ihn als aktiven Cluster festlegen und mit Cloud Code arbeiten.
Klicken Sie im Header des Bereichs „Kubernetes Explorer“ auf + GKE-Cluster hinzufügen.
Klicken Sie auf Google Kubernetes Engine.
Klicken Sie auf den Clusternamen. Der Cluster wird der KubeConfig hinzugefügt.
Cluster als Standardkontext festlegen
Der aktive Cluster ist der Cluster, in dem Ihre Anwendung standardmäßig bereitgestellt wird.
Klicken Sie im Kubernetes Explorer mit der rechten Maustaste auf einen Cluster und dann auf Set as Current Context.
Anwendung in GKE ausführen
Zum Ausführen oder Debuggen einer Anwendung in GKE müssen Sie das Container-Image-Repository für Ihr Projekt definieren.
Nachdem Sie einen Cluster aus Ihrer KubeConfig entfernt haben, kann der Cluster nicht mehr bereitgestellt werden.
Klicken Sie im Kubernetes Explorer mit der rechten Maustaste auf einen Cluster und dann auf Aus KubeConfig entfernen.
Cluster von einem anderen Cloud-Anbieter erstellen und hinzufügen
Wenn Sie einen lokalen Cluster oder einen Cluster von einem anderen Anbieter wie Azure oder AWS verwenden, erstellen Sie den Cluster mit den Tools des Anbieters und fügen Sie ihn Ihrer KubeConfig hinzu.
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-05 (UTC)."],[[["\u003cp\u003eCloud Code facilitates the creation of a Kubernetes cluster using Google Kubernetes Engine (GKE) directly from the Google Cloud console.\u003c/p\u003e\n"],["\u003cp\u003eExisting Standard or Autopilot GKE clusters can be connected and managed within Cloud Code, and any cluster can be set as the default context for application deployment.\u003c/p\u003e\n"],["\u003cp\u003eCloud Code allows for the management of cluster connections, including adding, removing, and setting the active cluster within the KubeConfig.\u003c/p\u003e\n"],["\u003cp\u003eUsers can utilize clusters from other providers, such as Azure or AWS, by creating them with the respective provider's tools and then adding them to their KubeConfig.\u003c/p\u003e\n"],["\u003cp\u003eCloud code offers features for advanced cluster management, such as organizing access with kubeconfig files, developing and debugging microservices with Skaffold, and using file sync and hot reloading for rapid development.\u003c/p\u003e\n"]]],[],null,["# Configure a GKE cluster in Cloud Code for IntelliJ\n\nWith Cloud Code, you can create a Kubernetes cluster with\nGoogle Kubernetes Engine (GKE).\n| **Note:** For developing and testing an app, create and run on a non-production cluster. For changes that will be rolled out to production, use an [automated CI/CD workflow](/docs/ci-cd).\n\nCreate a GKE cluster and add it to your KubeConfig\n--------------------------------------------------\n\nCloud Code opens the Google Cloud console so that you can quickly\ncreate a cluster:\n\n1. To open the Kubernetes Explorer, click\n\n **Kubernetes Explorer** or navigate to **Tools** \\\u003e **Cloud Code** \\\u003e\n **Kubernetes** \\\u003e **View Cluster Explorer**.\n\n2. In the header of the Kubernetes Explorer pane, click\n **+ Connect to a GKE Cluster**.\n\n3. Choose **Create a new GKE Cluster** or\n **Create a new GKE Autopilot cluster** . For more information on which mode to\n choose, see\n [Comparing Autopilot and Standard modes](/kubernetes-engine/docs/concepts/autopilot-overview#comparison).\n\n4. If prompted, click **Open** to permit Cloud Code to open the\n Google Cloud console.\n\n5. In Google Cloud console, choose any configuration options that you want\n to customize and then click **Create**.\n\n6. After the cluster is created, in Cloud Code, in the Kubernetes\n explorer, click the **Refresh** icon.\n\n7. After the name of your new cluster appears in the list, click the cluster\n name. Your new cluster is added to the configuration and set as the default\n context.\n\nWork with an existing GKE cluster\n---------------------------------\n\nIf you have an existing Standard or Autopilot GKE cluster, you\ncan set it as your active cluster and work with it using\nCloud Code.\n\n1. In the header of the Kubernetes Explorer pane, click **+ Add GKE Cluster**.\n2. Click **Google Kubernetes Engine**.\n3. Click your cluster name. Your cluster is added to the KubeConfig.\n\nSet a cluster as the default context\n------------------------------------\n\nThe active cluster is the cluster that your application is deployed to by\ndefault.\n\nIn the Kubernetes Explorer, right-click a cluster and then click\n**Set as Current Context**.\n\nRun an application on GKE\n-------------------------\n\nTo run or debug an application on GKE, you'll need to define\nthe container image repository for your project.\n\nTo learn more, read about\n[storing your container images](/code/docs/intellij/configuring-container-image-settings).\n\n\nRemove a cluster from your KubeConfig\n-------------------------------------\n\nAfter you remove a cluster from your KubeConfig, the cluster is not available\nto deploy to.\n\nIn the Kubernetes Explorer, right-click a cluster and then click\n**Remove From KubeConfig**.\n\nCreate and add a cluster from another cloud provider\n----------------------------------------------------\n\nIf you're using an on-premises cluster or a cluster from another provider such\nas Azure or AWS, use the provider's tools to create the cluster and add it to\nyour KubeConfig.\n\nWhat's next\n-----------\n\n- [Organize your cluster access using kubeconfig files](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/).\n- Learn how to add, delete or switch between your [kubeconfig files in Cloud Code](/code/docs/intellij/kubeconfigs).\n- [Develop and debug parts of a microservice application](/code/docs/intellij/speed-up-k8s-development#develop_microservices_applications_using_skaffold_configurations) using Skaffold.\n- Use [file sync and hot reloading](/code/docs/intellij/speed-up-k8s-development#enable-skaffold-file-sync-and-hot-reloading) to speed up development.\n- [Debug your application in Cloud Code](/code/docs/intellij/debug).\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)."]]