Get Started with Zing® 8 on a Kubernetes Cluster

Go back to the Zing Quickstart Guide.

Note: Our software distributions are signed by an OpenPGP key when appropriate. To verify your download, see Product Signing Keys (OpenPGP) for details.

These instructions introduce you to the quick and easy process of packaging Zing 8 in a Docker container image and running the container image on a Kubernetes cluster.

Prerequisites

    In order to install and run Zing 8 in Kubernetes, make sure a Kubernetes cluster is created and you have authentication credentials to interact with the cluster.

Step 1: Build a Docker Container Image for Zing 8

  1. Create and run a Docker container instance using the sample Dockerfile below:
  2. 
    FROM ubuntu:18.04
    RUN apt-get update &&\
      apt-get install -y software-properties-common && \
      apt-key adv --keyserver hkps://keyserver.ubuntu.com  --recv-keys 0x219BD9C9&& \
      apt-add-repository "deb https://repos.azul.com/zing/ubuntu $(lsb_release -sc) main"
    RUN apt-get install zing-jdk1.8.0 -y
      
  3. Build a Zing Docker image:
  4. docker build -t zing-docker .
  5. Run the Zing Docker container and verify that the Zing Virtual Machine is successfully installed in a container:
  6. docker run -it --rm  --env ZING_LICENSE="`cat ./ZING_LICENSE`" zing-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)
    

Step 2: Get a Zing License

  1. Sign up for a Zing Trial License in order to obtain your Zing Trial Token.
  2. Check the Zing Trial Token email you received from Azul and locate your Zing Trial Token (if you did not receive the email in your inbox, check your Spam or Junk email folders).
  3. Download your license:
  4. wget -O- https://trial-licenses.azul.com/redeem/Zing_Trial_Token > ./ZING_LICENSE

Step 3: Add the Zing License to the Kubernetes Cluster

    Add your Zing Trial License to the ConfigMap configuration file:

    kubectl create configmap zing-config --from-file=./ZING_LICENSE

Step 4: Create a Pod with Containerized Zing

    Create a pod with Zing in a Docker container using the ConfigMap:

    cat <<EOF > zing.yaml
    apiVersion: v1
    kind: Pod
    metadata:
      name: zing-pod
    spec:
      containers:
      - name: zing-pod
        image: zing-docker
        envFrom:
          - configMapRef:
              name: zing-config
    EOF
    
    kubectl apply -f zing.yaml
                                     

You are now ready to start running your Java applications using the containerized Zing Virtual Machine deployed on a Kubernetes cluster.

In case of issues, visit the Zing Community Forum.

See Also:

Zing System Requirements

Zing Troubleshooting Guide

Zing Virtual Machine Release Notes

Zing User’s Guide

Zing Community Forum