Skip to main content
In this lesson we wrap a Helm chart with an Operator using the Operator SDK Helm plugin. The goal is to avoid writing a Go reconciler: the Operator SDK will scaffold a controller that watches a Custom Resource (CR) and uses Helm to install, upgrade, and uninstall chart releases.
The image is a presentation slide featuring the text "Create A Helm Based Operator" and "Demo" with a minimalistic design. It also includes a copyright credit to KodeKloud.

What you get from a Helm-based Operator

A Helm-based operator uses Helm to manage the application lifecycle. Instead of writing reconciliation logic in Go, you map a Kubernetes API (CRD) to a Helm chart. The Operator SDK Helm plugin generates a smaller project surface than the Go plugin: you get a Helm chart, a watches.yaml mapping, and Kustomize manifests under config. The operator reconciles CRs by rendering the chart with values derived from the CR spec. Key benefits:
  • No custom Go reconciler required.
  • Leverages Helm charts and existing chart life-cycle semantics (install/upgrade/uninstall).
  • CR spec fields are passed into the chart as Helm values.
Recommended reading:

Initialize a Helm-based Operator project

Start in a clean directory and initialize an Operator SDK project with the Helm plugin:
Example output:

Create the API surface (CRD + chart for the resource)

Create an API for a sample NGINX resource using group demo, version v1, and kind Nginx. This command generates a Helm chart under helm-charts/nginx and scaffolds the sample CR manifest:
Example output:
The RBAC rules are derived from the chart’s default manifests. Review config/rbac/role.yaml and tighten permissions if needed before deploying to production.

How the mapping works: watches.yaml

The watches.yaml file maps the Kubernetes API to the chart:
  • If you see a Nginx object in the API group demo.example.com, reconcile it using the chart in helm-charts/nginx.
  • The operator reads the CR spec and injects those values into Helm rendering.
This mapping is the core of a Helm-based operator: CR → Helm values → rendered Kubernetes resources.

Chart design and values

Design your Helm chart to expose the values you want users to control via the CR spec. Fields under spec in the CR are translated into Helm chart values, so chart authors should treat these values as the operator-facing surface. Example snippets from the generated chart’s values.yaml (these become the operator surface):
Design your Helm chart with operator usage in mind: expose the values you expect operators (or users) to modify via the custom resource spec.
Common example values that the generated chart exposes:

Install the CRD and run the operator locally

Install the generated CRD so the API server recognizes the Nginx resource type:
Example output:
Start the operator in the foreground (leave this running in one terminal):
Example operator logs when starting:

Create a release by applying the sample CR

In another terminal, apply the generated sample custom resource that represents an NGINX release:
Example output:
What happens:
  • The controller sees the new Nginx object.
  • It reads .spec from the CR and passes those values into Helm rendering.
  • Helm templates are rendered and the resulting Kubernetes resources (Deployment, Service, ConfigMap, etc.) are created.
No custom Go reconciler code is needed; the operator uses Helm to manage the release lifecycle.

Verify the release and troubleshoot

Wait for the generated deployment to become available:
Inspect replicas and ready replicas:
List resources associated with this Helm release using the instance label:
If you need to inspect the full generated Deployment:

Update desired state by patching the CR

To change desired state, patch the custom resource. For example, update the replica count:
The Helm operator will reconcile the change and upgrade the Helm release. Confirm the deployment scaled:

Delete the release by deleting the CR

To uninstall the release, delete the custom resource:
The operator will uninstall the associated Helm release and clean up API objects created by the chart.

Summary and when to choose Helm vs Go operators

Helm-based operators are ideal when:
  • You already have a Helm chart that represents the application lifecycle.
  • The CR only needs to expose chart values (mapping spec → Helm values).
  • You want to avoid writing reconciliation code.
Consider a Go-based controller when:
  • You need advanced reconciliation logic.
  • You must call external APIs or implement complex status updates.
  • Custom status computation or multi-resource coordination is required.
Useful references:

Watch Video