Kubernetes: Deploy a Java Helidon Application
In this tutorial, you use an Oracle Cloud Infrastructure account to set up a Kubernetes cluster. Then, you deploy a Java Helidon application to your cluster. Key tasks include how to:
- Set up OpenSSL API encryption keys to access your cluster.
- Set up an authentication token.
- Set up a Kubernetes cluster on OCI.
- Set up OCI CLI to access your cluster.
- Build a Java Helidon application and Docker Image.
- Push your image to OCIR.
- Deploy your Docker application to your cluster.
- Connect to your application from the internet.

For additional information, see:
Before You Begin
To successfully perform this tutorial, you must have the following:
- A paid Oracle Cloud Infrastructure account. See Signing Up for Oracle Cloud Infrastructure.
- A Linux environment:
- A MacOS
- A Linux computer
If you have Windows, you can Git for Windows and access a Linux environment. Here are some options:
- Install a Linux VM with an Always Free Compute shape, on Oracle Cloud Infrastructure:
- Install Oracle Virtual Box or a similar application.
Install or have the following applications:
- JDK 8+ and set JAVA_HOME in .bashrc
- Python 3
- Kubernetes 1.11.9+
- Apache Maven 3.6+
- Docker 18.0.6+
1. Gather Required Information
Prepare the information you need from the Oracle Cloud Infrastructure Console.
2. Set up OCI Command Line Interface
You can use the OCI Command Line Interface (CLI) to push your application to Registry and then pull and deploy it with Container Engine for Kubernetes. In this step, you install and set up the CLI to run on a MacOS or a Linux environment.
3. Create your Kubernetes Cluster
Set up the Kubernetes cluster you will deploy your application to. You will use a wizard to set up your first cluster.
4. Manage your Kubernetes Cluster (Local)
In this section, you include the Kubernetes cluster information in a .kube/config file, so you can access the cluster and manage deployments. To do that, complete the following steps:
With your cluster configured, you are now ready to prepare your application for deployment.
5. Create your Local Helidon Application
Next, build your application Docker image so you can deploy the image to Oracle Cloud Infrastructure Registry (OCIR).
To create a Helidon Docker image, perform the following steps:
References:
-
For detailed information on this example, see Helidon MP Quickstart
-
To create your own application, see Helidon MP Config Guide
6. Deploy your Docker Image to OCIR and your Cluster
Next, push your Docker image to OCIR. Then use that Docker image to deploy your application:
Now change to your local machine so you can push your image to OCIR.
With your image in OCIR, you can now deploy your application.
Your load balancer may take a few seconds to load after issuing the command.
What's Next
You have successfully created a Hello World application, deployed it to a Kubernetes cluster and made it accessible on the internet, using the Helidon MicroProfile service.
To explore more information about development with Oracle products check out these sites: