Skip to main content
Version: v1.5

Install Helm Charts with Nova

Overview

This tutorial shows how to install a Helm chart through the Nova Control Plane.

Helm renders standard Kubernetes resources. When those resources are applied to the Nova Control Plane and match a SchedulePolicy, Nova schedules them to an eligible workload cluster.

This example installs the Bitnami nginx chart. In a production environment, customize the SchedulePolicy, chart, and values for your own workload clusters and application requirements.

Before You Begin

Before starting, make sure you have:

  • A running Nova Control Plane.
  • At least one workload cluster registered with Nova.
  • kubectl configured with access to the Nova Control Plane.
  • Helm installed locally.
  • A workload cluster label you can use in a SchedulePolicy.

This tutorial uses the following contexts:

  • ${NOVA_CONTROLPLANE_CONTEXT} for the Nova Control Plane.
  • ${K8S_CLUSTER_CONTEXT_1} for the workload cluster where the chart resources are expected to run.

How It Works

In this workflow:

  1. Create a SchedulePolicy in the Nova Control Plane.
  2. Configure the Helm chart so its rendered resources include labels that match the SchedulePolicy.
  3. Install the Helm chart against the Nova Control Plane.
  4. Nova places the chart resources on an eligible workload cluster.
  5. Verify the resources in both the Nova Control Plane and the selected workload cluster.

Step 1: Define a SchedulePolicy

A SchedulePolicy tells Nova which resources to select and which workload clusters are eligible to run them.

For this tutorial, the SchedulePolicy selects resources in the default namespace that have the label nova.elotl.co/policy: example-helm-policy. It then places those resources on a workload cluster labeled kubernetes.io/metadata.name: workload-1.

The label used in the resourceSelectors section must also be added to the resources rendered by the Helm chart. This is what allows Nova to associate the Helm chart resources with this policy.

Apply the following SchedulePolicy to the Nova Control Plane:

kubectl apply --context=${NOVA_CONTROLPLANE_CONTEXT} -f - <<'EOF'
apiVersion: policy.elotl.co/v1alpha1
kind: SchedulePolicy
metadata:
name: example-helm-policy
spec:
namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: default
clusterSelector:
matchLabels:
kubernetes.io/metadata.name: wlc-1
resourceSelectors:
labelSelectors:
- matchLabels:
nova.elotl.co/policy: example-helm-policy
EOF

Step 2: Prepare the Helm chart values

This example uses the Bitnami nginx chart:

oci://registry-1.docker.io/bitnamicharts/nginx

The Bitnami nginx chart supports adding labels to rendered resources through the commonLabels map in the chart values.

In the next step, this tutorial sets the label directly with Helm's --set flag so the command can be copied and run without creating a separate values file.

These labels allow the rendered chart resources to match the SchedulePolicy resourceSelector.

note

Different Helm charts expose labels differently. This example uses the Bitnami nginx chart because it supports commonLabels.

For other charts, review the chart values and make sure the rendered resources include labels that match the SchedulePolicy resourceSelector.

Step 3: Install the Helm chart through the Nova Control Plane

Install the chart using the Nova Control Plane context.

This command sets the policy label directly with Helm's --set flag:

helm install nginx oci://registry-1.docker.io/bitnamicharts/nginx \
--kube-context=${NOVA_CONTROLPLANE_CONTEXT} \
--set commonLabels."nova\.elotl\.co/policy"=example-helm-policy

If you prefer to manage chart values in a file, you can instead define the label in a values file using the chart's commonLabels setting.

Step 4: Verify the chart resources

First, verify that the resources exist in the Nova Control Plane:

kubectl get deploy --context=${NOVA_CONTROLPLANE_CONTEXT}

Example output:

NAME READY UP-TO-DATE AVAILABLE AGE
nginx 1/1 1 1 2m8s

Then verify that the resources were placed on the expected workload cluster:

kubectl get deploy --context=${K8S_CLUSTER_CONTEXT_1}

You can also check scheduling events in the Nova Control Plane:

kubectl get events --context=${NOVA_CONTROLPLANE_CONTEXT} --namespace=default

The nginx Deployment should now be scheduled to the selected workload cluster.

Cleanup

To uninstall the Helm release, run:

helm uninstall nginx --kube-context=${NOVA_CONTROLPLANE_CONTEXT}

If you no longer need the example SchedulePolicy, delete it from the Nova Control Plane:

kubectl delete schedulepolicy example-helm-policy --context=${NOVA_CONTROLPLANE_CONTEXT}