Using an existing application

If you have an existing project already configured with Kubernetes manifests and a Dockerfile (or Jib), you can open and use it with the plugin. The only additional configuration necessary is a Skaffold YAML file which either can be generated for you automatically or created using the provided template.

Automatic project bootstrapping

If your project has Dockerfile and Kubernetes resources, Cloud Code will prompt you with a notification to automatically create this configuration. Once created, your project is ready to use the Cloud Code Kubernetes continuous development and deployment features.

Alternatively, Tools > Cloud Code > Kubernetes > Add Kubernetes Support can be used to analyze the project Kubernetes resources and generate Skaffold configuration. This includes adding two run configurations: one for deployment and one for continuous deployment to a Kubernetes cluster. After support is added, you can immediately start deploying and debugging your project on Kubernetes using the newly added run configurations.

Manually creating Cloud Code Skaffold configuration

To create a Skaffold YAML manually, follow these instructions to take advantage of the live templating support:

  • Create new file named skaffold.yaml in the root directory of your project (right-click > New > File).
  • Type 'skaffold' and accept the proposed Skaffold live template. Using the Skaffold YAML template
  • Populate the image field with your project image name and the manifests field with a list of the Kubernetes resources you'd like to be deployed from the IDE.

    Example for Dockerfile based builds:

        - image:
          - k8s/web.yaml
          - k8s/backend.yaml

    Example build section for Java Maven/Gradle projects with the Jib plugin (deploy section stays the same):

    - image:
      jibMaven: {}
  • Once your skaffold.yaml is valid, the plugin will prompt you to create Kubernetes run targets automatically.

    Create Kubernetes run target notification

Getting Support

To send feedback, report issues on GitHub, or ask a question on Stack Overflow.
هل كانت هذه الصفحة مفيدة؟ يرجى تقييم أدائنا:

إرسال تعليقات حول...

Cloud Code for IntelliJ