Visit Support

Installing Cloud Native Compiler on Minikube

Table of Contents
Need help?
Schedule a consultation with an Azul performance expert.
Contact Us
Talk about OpenJDK?
Discuss with the community on the Foojay Forum.
Go to Forum

Minikube can be used for testing and evaluating Cloud Native Compiler (CNC).

You should run CNC on minikube only for evaluation purposes. Make sure your minikube meets the 18 vCore minimum for running CNC. Although minikube can run on multiple platforms, Cloud Native Compiler is only available for the amd64 platform, so not on macOS with M1/2.

Installing Minikube

Install minikube for your platform following this installation guide.

Installing Cloud Native Compiler

Cloud Native Compiler uses Helm as the deployment manifest package manager. There is no need to manually edit any Kubernetes deployment manifests.

  1. Make sure your Helm version is v3.8.0 or newer.

  2. Add the Azul Helm repository to your Helm environment:

    helm repo add cnc-helm helm repo update
  3. Create a namespace (i.e. compiler) for CNC.

    minikube kubectl -- create namespace compiler
  4. Create a configuration file values-minikube.yaml.

    An example file is available on GitHub in the Azul "cnc-helm-charts" project, to disable all resource definitions.

    As the supplied values file for minikube resets pod resources to null, we can simply add only the persistent volume section:

    db: resources: persistentDataVolume: enabled: true

    You can also set the volume size if the default 200Gi is too big for local testing:

    db: resources: persistentDataVolume: enabled: true size: "50Gi"
  5. Install using Helm, passing in the values-minikube.yaml:

    helm install compiler cnc-helm/prime-cnc -n compiler -f values-minikube.yaml

    The command should produce output similar to this:

    NAME: compiler LAST DEPLOYED: Mon Jan 30 14:35:29 2023 NAMESPACE: compiler STATUS: deployed REVISION: 1 TEST SUITE: None
  6. Verify that all started pods are ready:

    minikube kubectl -- get all -n compiler

Uninstalling Cloud Native Compiler from Minikube

CNC can be removed from minikube using helm, after which the namespace can also be deleted.

$ helm uninstall compiler -n compiler $ minikube kubectl -- delete namespace compiler