Understanding Helm Chart Installation and Management
Default Helm Labels
In our previous example, we ran the following command to verify the installation:
kubectl get all -l app.kubernetes.io/instance=my-wordpress
The label app.kubernetes.io/instance is one of the default labels that Helm adds to all the Kubernetes resources it creates. This label helps identify which resources belong to a specific Helm release.
There are other default labels that are automatically added by Helm as well:
app.kubernetes.io/name: The name of the chart (e.g.,wordpress).app.kubernetes.io/version: The version of the application (e.g.,5.8.1).app.kubernetes.io/managed-by: The tool managing the deployment (e.g.,Helm).app.kubernetes.io/component: The component within the application (e.g.,web,database,frontend,backend, etc., depending on the chart).app.kubernetes.io/part-of: The name of the larger application this component is part of (e.g.,my-application).helm.sh/chart: The name and version of the chart (e.g.,wordpress-10.1.5).
These labels are created based on the information provided in the Chart.yaml file and the release name specified during installation. The following table summarizes what's created and how:
| Label | Required/Optional | Description | How it's Set |
|---|---|---|---|
| app.kubernetes.io/name | Required | Logical name of the application. Groups all components belonging to a single app. | Usually set using {{ template "name" . }}, which typically resolves to .Chart.Name. |
| helm.sh/chart | Required | Identifies which chart and chart version produced this resource. Useful for auditing and debugging. | Helm sets this via {{ .Chart.Name }}-{{ .Chart.Version \| replace "+" "_" }} so labels remain valid. |
| app.kubernetes.io/managed-by | Required | Indicates the management tool (always Helm for Helm-managed objects). | Automatically set to {{ .Release.Service }}, which equals "Helm". |
| app.kubernetes.io/instance | Required | Distinguishes different deployments of the same chart (prod, staging, test, etc.). | Set to {{ .Release.Name }}, the name passed during helm install/upgrade. |
| app.kubernetes.io/version | Optional | Version of the underlying application (e.g., WordPress, Redis), not the chart version. | Usually set using {{ .Chart.AppVersion }} from Chart.yaml. |
| app.kubernetes.io/component | Optional | Identifies the component role: frontend, backend, database, worker, etc. | Manually defined in chart templates or values.yaml. |
| app.kubernetes.io/part-of | Optional | Groups multiple charts/components under one larger system or “application”. | Manually set by chart authors using a fixed value or {{ .Values.appName }}. |
Below is a practical explanation of every template reference that appears in the table:
{{ template "name" . }}
This calls a named template defined in _helpers.tpl files. Many charts include a template like this:
{{- define "name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}
Helm in Practice
Designing, Deploying, and Operating Kubernetes Applications at ScaleEnroll now to unlock current content and receive all future updates for free. Your purchase supports the author and fuels the creation of more exciting content. Act fast, as the price will rise as the course nears completion!
Hurry! This limited time offer ends in:
To redeem this offer, copy the coupon code below and apply it at checkout:
