Get Started with Azul Platform Prime in a Kubernetes Cluster
- Installing a Stream Build of Azul Platform Prime in a Container
- Creating a Pod with Containerized Azul Platform Prime
Looking for Zing? The Azul Zing Virtual Machine is now Azul Zulu Prime Builds of OpenJDK and part of Azul Platform Prime. Learn more.
Need a different Linux distro? Go back to Azul Platform Prime Downloads.
These instructions introduce you to the quick and easy process of installing Azul Platform Prime in a Docker container on a Kubernetes cluster. In this example, we install and run Java 8. Adjust the JDK version to install a different Java version.
|Our software distributions are signed by an OpenPGP key when appropriate. To verify your download, see Product Signing Keys (OpenPGP) for details.|
Installing a Stream Build of Azul Platform Prime in a Container
Stream Builds are produced once a month, do not receive any security backports, and are free for development, testing, and evaluation. By downloading Stream Builds, you agree to the Azul Platform Prime Evaluation Agreement. For more information, see the Azul Platform Prime Roadmap. Stream Builds are available from Linux repositories, so they are easy to integrate into a Docker container as shown below.
Create and run a Docker container instance using the sample Dockerfile below:From ubuntu:18.04 RUN apt-get update && \ apt-get install -y software-properties-common && \ # Copy Azul's public key apt-key adv --keyserver hkps://keyserver.ubuntu.com --recv-keys 0xB1998361219BD9C9 && \ # Complete the installation (on Debian-based systems) /usr/bin/apt-add-repository "deb https://repos.azul.com/zing/ubuntu $(lsb_release -sc) main" && \ apt-get update -y && \ apt-get install zing-jdk1.8.0 -y
Build an Azul Platform Prime Docker image:+docker build -t azul-docker .
Run the Azul Docker container and verify that Azul Platform Prime is successfully installed in a container:docker run -it --rm azul-docker /opt/zing/zing-jdk8/bin/java -version
The output should look similar to the snippet below:java version "1.8.0-zing_19.07.0.0" Zing Runtime Environment for Java Applications (build 1.8.0-zing_19.07.0.0-b3) Zing 64-Bit Tiered VM (build 1.8.0-zing_19.07.0.0-b4-product-linux-X86_64, mixed mode)
Creating a Pod with Containerized Azul Platform Prime
Create a pod with Azul Platform Prime in a Docker container using the ConfigMap:cat <<EOF > azul.yaml apiVersion: v1 kind: Pod metadata: name: azul-pod spec: containers: - name: azul-pod image: azul-docker envFrom: - configMapRef: name: azul-config EOF kubectl apply -f azul.yaml
You are now ready to start running your Java applications using the containerized Azul Platform Prime deployed on a Kubernetes cluster.