이미지를 빌드할 Kubernetes 매니페스트, Dockerfile 또는 Jib으로 구성된 기존 프로젝트가 있는 경우 플러그인으로 프로젝트를 열고 사용할 수 있습니다. 추가 구성으로는 자동으로 생성되거나 제공된 템플릿으로 만들 수 있는 Skaffold YAML 파일만 필요합니다.
(옵션 2) 프로젝트를 빌드팩을 사용하여 빌드할 수 있으며 Kubernetes 리소스가 있는 경우
Kubernetes 실행 구성 설정
기본 요건이 충족되면 Cloud Code에 skaffold.yaml 파일(아직 없는 경우)과 필요한 실행 구성을 만들라는 메시지가 표시됩니다.
알림을 클릭합니다. 이렇게 하면 구성이 자동으로 생성됩니다(가능한 경우).
여러 이미지 또는 빌더가 감지되어 자동 Skaffold 구성을 만들 수 없는 경우 Cloud Code에서 감지된 이미지와 빌더 간에 매핑을 제공하라는 대화상자를 표시합니다.
또는 도구 >Cloud Code >Kubernetes로 이동하여 Kubernetes 지원 추가를 선택해 Skaffold 구성을 설정할 수도 있습니다.
이 옵션은 프로젝트의 Kubernetes 리소스를 분석하고 skaffold.yaml 파일(아직 없는 경우)과 필요한 실행 구성을 생성합니다. 이때 생성되는 실행 구성으로는 Kubernetes에서 프로젝트를 실행하기 위한 구성과 Kubernetes 클러스터 개발용 구성이 있습니다.
지원이 추가되면 새로 추가된 실행 구성을 사용하여 Kubernetes에서 프로젝트를 실행하고 디버깅할 수 있습니다.
Cloud Code Skaffold 구성 수동으로 만들기
새 skaffold.yaml 파일을 수동으로 만들거나 기존 파일을 프로젝트에 추가할 수 있습니다.
실시간 템플릿을 사용하여 skaffold.yaml 파일을 수동으로 만들려면 다음 단계를 따르세요.
프로젝트의 루트 디렉터리에 skaffold.yaml이라는 새 파일을 만듭니다(마우스 오른쪽 버튼으로 클릭 > New(새로 만들기) > File(파일)).
새 파일에 커서로 Ctrl+Space를 눌러서 라이브 템플릿 제안을 가져오고 원하는 Skaffold 템플릿을 선택합니다.
이미지 필드에 프로젝트 이미지 이름을 입력하고 매니페스트 필드에 IDE에서 배포할 Kubernetes 리소스 목록을 입력합니다.
Cloud Code에서 skaffold.yaml 파일을 유효한 것으로 확인하면 메시지를 클릭하여 Kubernetes 실행 구성을 만듭니다.
기본적으로 프로젝트는 Kubernetes 매니페스트에 지정된 이미지 이름을 사용하도록 구성됩니다. 이 이미지 사양을 맞춤설정할 수도 있습니다. 원하는 저장소(Artifact Registry, DockerHub 또는 비공개 저장소)를 설정한 후 실행 구성을 수정하고 이를 실행 구성 설정에서 기본 이미지 저장소로 지정합니다.
이러한 기능은 구성 수정 >Kubernetes에서 개발 >이미지 저장소 아래 상단 작업 표시줄의 실행/디버그 구성 대화상자에서 액세스할 수 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[[["\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)."]]