Cloud Code comes with a collection ofcode sampletemplates to get you started quickly. To create a Kubernetes application using
an existing sample, follow these steps:
OpenFile>New Project.
SelectCloud Code: Kubernetes.
Select a template from the list of starter applications.
Pick a name for your project.
Once you clickFinish, Cloud Code will clone your chosen
template and open your newly created project for use.
ForJavatemplates, you'll be prompted to import Maven projects
to sync your pom.xml. ClickAdd as Maven project. Additionally, import
necessary Maven projects by clickingImport Changes.
Kubernetes run and development IDE run targets for the project are
automatically created and ready to run.
Optional:Alternatively, you can
manually create run targets:
Select theRun Configurationdrop down, and clickEdit Configurations.
Click+ Add New Configurationto add a new run configuration.
Navigate toCloud Code: Kubernetes
Enter a name for your new configuration (default is "Unnamed").
Before running your application, ensure you're set up to deploy your app to
your preferred Kubernetes context. You can specify this in yourconfiguration.
If you'd like to switch your current context, you can do so with theKubernetes Explorer,
accessible either from its sidebar panel on the right or
usingTools>Cloud Code>Kubernetes>View Cluster Explorer.
To optimize your development loop by quickly picking up file changes of a
certain type without having to perform an image rebuild, you canenable file syncing and hot reloading.
Configuration
When using theCloud Code: Develop on Kubernetesrun configuration, you can
customize your deployment by configuring available settings.
To add or edit configurations, go toRun>Edit Configurations.
Create and deploy to a minikube cluster
Edit run configuration
Click the configuration drop down in the top taskbar and then clickEdit Configurations.
TheDevelop on Kubernetesconfiguration watches for changes, then usesSkaffoldto rebuild and rerun your app. You can
customize your deployment by making changes to this run configuration or by
creating a new Cloud Code: Kubernetes run configuration.
In theRun/Debug configurations dialogforRun>Deployment,
selectDeploy locally to a minikube cluster.
ClickOKto save your configuration.
Run on minikube
SelectDevelop on Kubernetesfrom the configuration dropdown and click
theRunicon.
Cloud Code runs your app in a local minikube cluster.
View the build process in the output window.
When the deployment is successful, you're notified that new service URLs are
available
Click the Service URLs tab to view the URLs, then click the URL link to open
your browser with your running application
To stop the application, click the stop icon next to the configuration
dropdown.
Create and add a cluster from another cloud provider
If you're using an on-premises cluster or a cluster from another provider such as
Azure or AWS, use the provider's tools to create the cluster and add it to your
KubeConfig.
Work with other local clusters
In addition tominikube, you can work with
Cloud Code if you're using Docker Desktop (forMacorWindows).
To get Cloud Code working with a local cluster, make sure that
your default configuration (for example,~/.kube/config) contains your local
cluster. This cluster must be set as the current context.
For example, if you were using a local cluster,docker-for-desktop, with
Docker Desktop, set your preferred cluster by running the following command:
To submit feedback or report an issue in your IntelliJ IDE, go toTools>Cloud Code>Help / About>Submit
feedback or report an issueto report an issue onGitHub.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eCloud Code simplifies Kubernetes application development by providing templates for quick starts and automatically managing minikube.\u003c/p\u003e\n"],["\u003cp\u003eYou can create a new project from a template, which clones the template and prepares the project with ready-to-run Kubernetes configurations.\u003c/p\u003e\n"],["\u003cp\u003eCloud Code allows using existing projects, running applications on minikube, or working with clusters from other providers or local setups, as well as customizing deployments by editing run configurations.\u003c/p\u003e\n"],["\u003cp\u003eBefore running applications, it's important to ensure the correct Kubernetes context is set, which can be managed through the Kubernetes Explorer or configuration settings.\u003c/p\u003e\n"],["\u003cp\u003eCloud Code offers features like file syncing and hot reloading to enhance the development workflow and provides debugging capabilities for your applications.\u003c/p\u003e\n"]]],[],null,["# Use minikube for local development in Cloud Code for IntelliJ\n\nCloud Code automatically installs and manages minikube. If\nyou opted out of dependency management, add the minikube binary to your `PATH`.\n\nBefore you begin\n----------------\n\n1. Install [Git](https://git-scm.com/downloads) so that Cloud Code can perform Git operations, like cloning a sample.\n2. Install the [Cloud Code plugin](/code/docs/intellij/install) if you haven't already.\n\nCreate an application from a template\n-------------------------------------\n\nCloud Code comes with a collection of\n[code sample](https://github.com/GoogleCloudPlatform/cloud-code-samples#readme)\ntemplates to get you started quickly. To create a Kubernetes application using\nan existing sample, follow these steps:\n\n\u003cbr /\u003e\n\n1. Open **File** \\\u003e **New Project**.\n2. Select **Cloud Code: Kubernetes**.\n3. Select a template from the list of starter applications.\n4. Pick a name for your project.\n\n Once you click **Finish**, Cloud Code will clone your chosen\n template and open your newly created project for use.\n\n For **Java** templates, you'll be prompted to import Maven projects\n to sync your pom.xml. Click **Add as Maven project** . Additionally, import\n necessary Maven projects by clicking **Import Changes**.\n5. Kubernetes run and development IDE run targets for the project are\n automatically created and ready to run.\n\n Optional: Alternatively, you can\n manually create run targets:\n 1. Select the **Run Configuration** drop down, and click **Edit Configurations**.\n 2. Click **+ Add New Configuration** to add a new run configuration.\n 3. Navigate to **Cloud Code: Kubernetes**\n 4. Enter a name for your new configuration (default is \"Unnamed\").\n 5. Click **OK** to create your run target.\n\n | **Note:** If you're logged into Google Cloud in your IDE and you have a default project defined, Cloud Code uses your default container image repository. To specify a different container image, follow [Configuring\n | container image settings](/code/docs/intellij/configuring-container-image-settings#specifying_where_container_images_are_stored).\n\nUse your own application\n------------------------\n\nFor steps to use an existing project, see\n[use Cloud Code with an existing Kubernetes application](/code/docs/intellij/use-existing-app).\n| **Note:** For developing and testing an app, create and run the application on a non-production cluster. \n| For changes that will be rolled out to production, use an [automated CI/CD workflow](/docs/ci-cd).\n\nSet your Kubernetes context\n---------------------------\n\nBefore running your application, ensure you're set up to deploy your app to\nyour preferred Kubernetes context. You can specify this in your\n[configuration](#configuration).\n\nIf you'd like to switch your current context, you can do so with the\n[Kubernetes Explorer](/code/docs/intellij/use-kubernetes-explorer#clusters),\naccessible either from its sidebar panel on the right or\nusing **Tools** \\\u003e **Cloud Code** \\\u003e **Kubernetes** \\\u003e **View Cluster Explorer**.\n\nTo optimize your development loop by quickly picking up file changes of a\ncertain type without having to perform an image rebuild, you can\n[enable file syncing and hot reloading](/code/docs/intellij/yaml-editing#enabling_skaffold_file_sync_and_hot_reloading).\n\n\nConfiguration\n-------------\n\nWhen using the **Cloud Code: Develop on Kubernetes** run configuration, you can\ncustomize your deployment by configuring available settings.\nTo add or edit configurations, go to **Run** \\\u003e **Edit Configurations** .\n\n\u003cbr /\u003e\n\nCreate and deploy to a minikube cluster\n---------------------------------------\n\n### Edit run configuration\n\n1. Click the configuration drop down in the top taskbar and then click\n **Edit Configurations**.\n\n The **Develop on Kubernetes** configuration watches for changes, then uses\n [Skaffold](https://skaffold.dev/docs/) to rebuild and rerun your app. You can\n customize your deployment by making changes to this run configuration or by\n creating a new Cloud Code: Kubernetes run configuration.\n2. In the **Run/Debug configurations dialog** for **Run** \\\u003e **Deployment** ,\n select **Deploy locally to a minikube cluster**.\n\n3. Click **OK** to save your configuration.\n\n### Run on minikube\n\n1. Select **Develop on Kubernetes** from the configuration dropdown and click the **Run** icon.\n2. Cloud Code runs your app in a local minikube cluster.\n3. View the build process in the output window.\n\n When the deployment is successful, you're notified that new service URLs are\n available\n4. Click the Service URLs tab to view the URLs, then click the URL link to open\n your browser with your running application\n\n5. To stop the application, click the stop icon next to the configuration\n dropdown.\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 as\nAzure or AWS, use the provider's tools to create the cluster and add it to your\nKubeConfig.\n\nWork with other local clusters\n------------------------------\n\nIn addition to\n[minikube](https://minikube.sigs.k8s.io/docs/start/), you can work with\nCloud Code if you're using Docker Desktop (for\n[Mac](https://docs.docker.com/docker-for-mac/) or\n[Windows](https://docs.docker.com/docker-for-windows/)).\n\nTo get Cloud Code working with a local cluster, make sure that\nyour default configuration (for example, `~/.kube/config`) contains your local\ncluster. This cluster must be set as the current context.\n\nFor example, if you were using a local cluster, `docker-for-desktop`, with\nDocker Desktop, set your preferred cluster by running the following command: \n\n kubectl config use-context docker-for-desktop\n\nWhat's next\n-----------\n\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)."]]