Quickstart

This page shows you how to get started with Cloud Code using your
own Kubernetes project or using the sample Hello World application.

Before you begin

Note: Kubernetes support for Cloud Code for IntelliJ is currently
in Alpha and might change or have limited support.
For more information,
see Product launch stages.Note: You must have a JetBrains IDE Version of 2019.1 or above to use
Cloud Code for IntelliJ.

The following tools are expected to be installed and setup on your system
and available on the PATH of your machine:

Adding Cloud Code support to your existing Kubernetes projects

If your project has a Dockerfile and Kubernetes resources, Cloud Code will prompt you with a notification to automatically create necessary configuration files and run targets.

Once created, your project is ready to use the Cloud Code's
continuous development and deployment features.

Alternatively, use Tools > Cloud Code > Kubernetes >
Add Kubernetes Support to analyze the project's Kubernetes resources,
generate a Skaffold configuration, and add two run configurations for
deployment and continuous deployment to a Kubernetes cluster.

Creating an application

This repository contains the Hello World samples (available in Java, Node,
Python, and Go). You can choose any sample to get started.

For the purposes of this quickstart, the Java sample will be used to
demonstrate the steps you need to take to create an application. Note,
you'll need to use Java 8 or higher to work with this sample.

Within IntelliJ IDEA, open the 'java-hello-world' project (from the cloud-code-samples/java/ directory).

You'll be prompted to import Maven projects to sync your pom.xml.

Click 'Import Changes' to continue.

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

Now that your application is ready for deployment, choose Kubernetes Deploy
from the Run/Debug configurations dialog on the top taskbar to deploy the application.

Initiating continuous deployment

To initiate continuous deployment for your application:

Choose the Kubernetes Continuous Deploy run target from the Run/Debug
configurations dialog on the top taskbar to continuously redeploy changes and
watch application logs.

Any changes to your code will automatically be built, pushed, and deployed
to a new version of your application.

View application logs in the output window. Once the deployment has
started, you'll see the list of forwarded ports for the deployed application.

Access your application locally using one of the listed ports.

Debugging your application

Note: Debugging support is currently available for Java, Kotlin, and Node.js.

To debug your application:

Click the debug action for Kubernetes Continuous Deploy to start the
development cycle in debug mode on your Kubernetes cluster.

Cloud Code will attach a debug session.

You can now perform all
the tasks you normally do when debugging local code, like setting breakpoints
and stepping through code, except with the added advantage of debugging
against a live Kubernetes cluster.