Creating an application

Creating an application from a template

Cloud Code comes with a collection of starter templates to get you started quickly. To create a Kubernetes application using an existing sample, follow these steps:

  1. Open File > New Project.
  2. Select Cloud Code: Kubernetes.
  3. Select a template from the list of starter applications. List of templates available: Python, Go, NodeJS, Java hello world and guestbook applications
  4. Pick a name for your project. Once you click Finish, Cloud Code will clone your chosen template and open your newly created project for use.

    For Java templates, you'll be prompted to import Maven projects to sync your pom.xml. Click 'Import Changes' to continue.

    Import Maven changes notification

  5. You'll also be prompted to automatically create Kubernetes run and development IDE run targets for the project with a notification.

    Click 'Create Cloud Code Kubernetes Run Configurations'.

    Create Kubernetes targets notification

  6. Optional: Alternatively, you can manually create run targets.

    • Select the 'Run Configuration' drop down, and click 'Edit Configurations'.
    • Click the '+' Add New Configuration button to add a new Run Configuration.
    • Browse to 'Cloud Code: Kubernetes'.

      Cloud Code: Kubernetes option in menu

    • Fill in a name for your new Configuration.

    • Click 'OK' to create your run target.

Specifying an image repository

Lastly, you'll need to enable access to the image repository where the project image is about to be pushed.

By default, the project is configured to use Google Container Registry. Once you have your repository set up (Google Container Registry, DockerHub, private repository, etc.), edit the run targets and specify it as a default image repository in run target settings. These are accessible from the Run/Debug configurations dialog on the top taskbar under 'Edit Configurations...' > 'Develop on Kubernetes' > 'Image options' > 'Default image repository'.

Specifying the default image repository in run target settings

Here are examples of how to specify the default image repository for some common registries:

  • Docker Hub:{account}
  • GCP Container Repository (GCR):{project_id}
  • AWS Container Repository (ECR): {aws_account_id}.dkr.ecr.{region}{my-app}
  • Azure Container Registry (ACR): {my_acr_name}{my-app}

The resulting image name is concatenated from the specified default image repository and the image name from the project's Kubernetes resources. For the 'java-guestbook' example, and GCR image repository as the default one, the resulting full image name would be{project_id}/

Using your own application

If you'd like to use a project of your own, refer to this guide on setting up your application.

Getting Support

To send feedback, report issues on GitHub, or ask a question on Stack Overflow.
Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Code for IntelliJ