[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[[["\u003cp\u003eThis plugin allows you to use existing projects with Kubernetes manifests, Dockerfiles, or Jib, requiring only a Skaffold YAML file, which can be auto-generated or created from a template.\u003c/p\u003e\n"],["\u003cp\u003eProjects must include Kubernetes manifests and either a Dockerfile with Jib configuration, or use Buildpacks, to be prompted to generate the \u003ccode\u003eskaffold.yaml\u003c/code\u003e configuration file and any other run configurations.\u003c/p\u003e\n"],["\u003cp\u003eCloud Code can automatically generate a Skaffold configuration, or users can manually create one by adding a \u003ccode\u003eskaffold.yaml\u003c/code\u003e file to the project's root directory and using live templates.\u003c/p\u003e\n"],["\u003cp\u003eUsers can specify a default image repository (such as Artifact Registry, DockerHub, or a private repository) within the run configuration settings to store container images.\u003c/p\u003e\n"],["\u003cp\u003eCloud Code supports various build settings including Docker, Jib, and Buildpacks, that can be configured through the Run configuration settings, under the 'Build / Deploy' tab.\u003c/p\u003e\n"]]],[],null,["# Use an existing application in Cloud Code for IntelliJ\n\nIf you have an existing project already configured with Kubernetes manifests, a\nDockerfile, or [Jib](https://github.com/GoogleContainerTools/jib) to build your\nimages, you can open and use it with the plugin. The only additional\nconfiguration necessary is a [Skaffold](/skaffold) YAML file which either can be\ngenerated for you automatically or\ncreated using the provided template.\n\nAfter you're done with configuring your Skaffold YAML, be sure to [specify where\nyour container images are stored](/code/docs/intellij/use-k8s-existing-app#specifying_where_container_images_are_stored)\nwhere the project image is about to be pushed.\n\nAutomatic project bootstrapping\n-------------------------------\n\nYour project must have one or more Kubernetes manifests. If\nCloud Code detects *any* Kubernetes manifests in the project,\nCloud Code will try to bootstrap.\n\nIf Cloud Code doesn't detect an existing Skaffold configuration,\nyou will be prompted to help set it up.\n\n### Prerequisites\n\nYour project must meet the following prerequisites in order to be prompted to\ncreate a `skaffold.yaml` file and run any necessary configurations:\n\n- (Option 1) Your project has a Dockerfile and is configured for\n [Jib](https://github.com/GoogleContainerTools/jib), or\n\n- (Option 2) Your project is buildable using Buildpacks and has Kubernetes\n resources.\n\n### Set up Kubernetes run configuration\n\nIf the [prerequisites](#prerequisites) are met, Cloud Code will\nprompt you with a notification to create a `skaffold.yaml` file (if one doesn't\nalready exist) and any necessary run configurations:\n\n1. Click the notification. This automatically creates your configuration if\n possible.\n\n If automatic Skaffold configuration creation is not possible due to multiple\n images or builders being detected, Cloud Code will display a\n dialog asking you to provide mappings between the detected images and\n builders.\n\n Alternatively, you can also set up a Skaffold configuration by navigating to\n **Tools** \\\u003e **Cloud Code** \\\u003e **Kubernetes** and selecting **Add Kubernetes\n Support**.\n\n This option analyzes your project's Kubernetes resources and generates a\n `skaffold.yaml` file (if one doesn't already exist) as well as necessary run\n configurations. The two run configurations generated include one to run\n your project on Kubernetes and one for development on a Kubernetes cluster.\n2. After support is added, you can start running and debugging your project on\n Kubernetes using the newly added run configurations.\n\nManually create a Cloud Code Skaffold configuration\n---------------------------------------------------\n\nYou can choose to manually create a new `skaffold.yaml` file or add an existing\none to your project.\n\nTo create a `skaffold.yaml` file manually using live templating, follow these\nsteps:\n\n1. Create a new file named `skaffold.yaml` in the root directory of your project\n (right-click \\\u003e **New** \\\u003e **File**).\n\n2. With the cursor in the new file, press `Ctrl+Space` to bring up the live\n template suggestions and then choose the desired Skaffold template.\n\n3. Populate the image field with your project image name and the manifests field\n with a list of the Kubernetes resources you want to deploy from the IDE.\n\n4. After Cloud Code determines that your `skaffold.yaml` file is valid, click the\n prompt to create Kubernetes run configurations.\n\n### Examples of Cloud Code Skaffold configurations\n\n- Dockerfile based builds:\n\n build:\n artifacts:\n - image: image_name\n deploy:\n kubectl:\n manifests:\n - k8s/web.yaml\n - k8s/backend.yaml\n\n- Build section for Java Maven/Gradle projects with the Jib plugin (deploy\n section stays the same as the example above):\n\n build:\n artifacts:\n - image: image_name\n jib: {}\n\n- If you'd like to define build, test, and deployment configurations for\n different contexts, you can have different profiles. Here's an example of a\n Cloud Build profile to configure Cloud Code to build images\n with Cloud Build:\n\n profiles:\n # use the cloudbuild profile to build images using Google Cloud Build\n - name: cloudbuild\n build:\n googleCloudBuild: {}\n\n- If you'd like to deploy your project with Helm, see the [Helm documentation](https://skaffold.dev/docs/pipeline-stages/deployers/helm/).\n\nSpecifying where container images are stored\n--------------------------------------------\n\n### Container image storage\n\nBefore you deploy your application, you'll need to define a default image\nrepository to use with your project.\n\nBy default, the project is configured to use the image name specified in your\nKubernetes manifests. You can also customize this image specification. Once\nyou have your preferred repository set up\n([Artifact Registry](/artifact-registry/docs), [DockerHub](https://hub.docker.com/),\nor a private repository), edit the run configurations and specify it as a\ndefault image repository in run configuration settings.\n\nThese are accessible from the Run/Debug configurations dialog on the top\ntaskbar under **Edit Configurations** \\\u003e **Develop on Kubernetes** \\\u003e\n**Image repository**.\n\nFor more on specifying your container image preferences, refer\nto the [Configuring container image settings guide](/code/docs/intellij/configuring-container-image-settings).\n\n### Build settings\n\nOnce you set your container image, you can configure its build settings.\nCloud Code supports Docker, Jib, and Buildpacks artifact types.\n\nOn the **Build / Deploy** tab of your Run configuration settings\n(**Edit Configurations** \\\u003e **Develop on Kubernetes**), you can configure the\nbuild settings for your default profile.\n\nFor more on specifying the build settings for your image, refer\nto the [Configuring container image build preferences guide](/code/docs/intellij/image-build-settings).\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)."]]