
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, awatches.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
specfields are passed into the chart as Helm values.
- Operator SDK docs: https://sdk.operatorframework.io
- Helm docs: https://helm.sh
- Kubernetes CRD overview: https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/
Initialize a Helm-based Operator project
Start in a clean directory and initialize an Operator SDK project with the Helm plugin:Create the API surface (CRD + chart for the resource)
Create an API for a sample NGINX resource using groupdemo, version v1, and kind Nginx. This command generates a Helm chart under helm-charts/nginx and scaffolds the sample CR manifest:
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
Thewatches.yaml file maps the Kubernetes API to the chart:
- If you see a
Nginxobject in the API groupdemo.example.com, reconcile it using the chart inhelm-charts/nginx. - The operator reads the CR
specand injects those values into Helm rendering.
Chart design and values
Design your Helm chart to expose the values you want users to control via the CRspec. 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.Install the CRD and run the operator locally
Install the generated CRD so the API server recognizes theNginx resource type:
Create a release by applying the sample CR
In another terminal, apply the generated sample custom resource that represents an NGINX release:- The controller sees the new
Nginxobject. - It reads
.specfrom the CR and passes those values into Helm rendering. - Helm templates are rendered and the resulting Kubernetes resources (Deployment, Service, ConfigMap, etc.) are created.
Verify the release and troubleshoot
Wait for the generated deployment to become available:Update desired state by patching the CR
To change desired state, patch the custom resource. For example, update the replica count:Delete the release by deleting the CR
To uninstall the release, delete the custom resource: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.
- You need advanced reconciliation logic.
- You must call external APIs or implement complex status updates.
- Custom status computation or multi-resource coordination is required.
- Operator SDK (Helm plugin): https://sdk.operatorframework.io/docs/helm/overview/
- Helm: https://helm.sh
- Kubernetes CRDs: https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/