Questions tagged [kubernetes-helm]

Helm is a tool for managing packages (i.e. charts) of templated Kubernetes resources.

Helm simplifies deploying a set of related Kubernetes resources by defining a standard directory structure to hold a set of YAML files, by adding a templating system to produce the actual Kubernetes resources, and by allowing prepackaged applications or components to be directly imported or installed.

The Go text/template engine allows values to be filled into Kubernetes YAML files. In a typical chart, templates/database_statefulset.yaml might contain the fragment:

containers:
  - name: mysql
    image: "{{ .Values.image }}:{{ .Values.tag }}"

values.yaml would provide default values for these settings:

image: mysql
tag: latest

When you install the chart, you can provide specific values for these settings.

helm install . --set tag=5.6

This tag is appropriate for most questions about Helm, including questions about the templating system and the command-line tool. It will frequently also be appropriate to tag questions as related, and many questions relate to the more general system. Do not tag questions as ; that is for a different tool.

External links

6042 questions
66
votes
5 answers

UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress

Yesterday, I stopped a Helm upgrade when it was running on a release pipeline in Azure DevOps and the followings deployments failed. I tried to see the chart that has failed with the aim of delete it but the chart of the microservice ("auth")…
65
votes
6 answers

How to make nested variables optional in Helm

How do I make an optional block in the values file and then refer to it in the template? For examples, say I have a values file that looks like the following: # values.yaml foo: bar: "something" And then I have a helm template that looks like…
Joe J
  • 9,985
  • 16
  • 68
  • 100
65
votes
2 answers

How do I see what custom values were used in a Helm release?

When I use helm install to install a chart into a Kubernetes cluster, I can pass custom values to the command to configure the release. helm must store them somewhere, because I can later rollback to them. However, I cannot find a way to view the…
Old Pro
  • 24,624
  • 7
  • 58
  • 106
64
votes
2 answers

Helm install in certain order

I am trying to create a Helm Chart with the following resources: Secret ConfigMap Service Job Deployment These are also in the order that I would like them to be deployed. I have put a hook in the Deployment so that it is post-install, but then…
waterprincess
  • 675
  • 1
  • 5
  • 6
63
votes
7 answers

how to delete tiller from kubernetes cluster

Tiller is not working properly in my kubernetes cluster. I want to delete everything Tiller. Tiller (2.5.1) has 1 Deployment, 1 ReplicaSet and 1 Pod. I tried: kubectl delete deployment tiller-deploy -n kube-system results in "deployment…
Bill
  • 631
  • 1
  • 5
  • 3
62
votes
4 answers

How to create a namespace if it doesn't exists from HELM templates?

I have a kind: Namespace template YAML, as per below: apiVersion: v1 kind: Namespace metadata: name: {{ .Values.namespace }} namespace: "" How do I make helm install create the above-given namespace ({{ .Values.namespace }}) if and only if…
62
votes
8 answers

Helm delete all releases

I'm trying find a way to delete all deployed releases in Helm. It appears that Helm does not support deleting all releases, with --all or otherwise. Would there be another way to delete all Helm releases in one command?
grizzthedj
  • 7,131
  • 16
  • 42
  • 62
61
votes
4 answers

How to create a ServiceMonitor for prometheus-operator?

Recently, prometheus-operator has been promoted to stable helm chart (https://github.com/helm/charts/tree/master/stable/prometheus-operator). I'd like to understand how to add a custom application to monitoring by prometheus-operator in a k8s…
andig
  • 13,378
  • 13
  • 61
  • 98
60
votes
7 answers

How to install a specific Chart version

I am trying to install a previous version of Prometheus, namely version 6.7.4: helm install -f stable/prometheus/values.yaml prometheus --name stable/prometheus --namespace prometheus --version 6.7.4 However it installs the latest version,…
MasterScrat
  • 7,090
  • 14
  • 48
  • 80
59
votes
5 answers

Helm: Passing array values through --set

i have a cronjob helm chat, i can define many jobs in values.yaml and cronjob.yaml will provision my jobs. I have faced an issue when setting the image tag id in command line, following command throw no errors but it wont update jobs image tag to…
Jack
  • 1,162
  • 3
  • 12
  • 27
57
votes
6 answers

"How to fix 'Error: must either provide a name or specify --generate-name' in Helm"

How to fix Error: must either provide a name or specify --generate-name in Helm Created sample helm chart name as mychart and written the deployment.yaml, service.yaml, ingress.yaml with nginx service. After that running the command like $ helm…
praveen
  • 703
  • 1
  • 5
  • 6
53
votes
5 answers

Helm export YAML files locally (just use templating engine, do not send to Kubernetes)

I want to export already templated Helm Charts as YAML files. I can not use Tiller on my Kubernetes Cluster at the moment, but still want to make use of Helm Charts. Basically, I want Helm to export the YAML that gets send to the Kubernetes API with…
j9dy
  • 2,029
  • 3
  • 25
  • 39
51
votes
6 answers

Helm rollback to previous release

I am looking for a way to rollback a helm release to its previous release without specifying the target release version as a number. Something like helm rollback ~1 (like git reset HEAD~1) would be nice.
onkeliroh
  • 1,530
  • 1
  • 14
  • 25
49
votes
3 answers

Error: found in Chart.yaml, but missing in charts/ directory: mysql

I have added mysql in requirements.yaml. Helm dependency downloads the mysql chart helm dependency update Hang tight while we grab the latest from your chart repositories... ...Successfully got an update from the "nginx" chart…
Komal Kadam
  • 808
  • 1
  • 7
  • 18
49
votes
3 answers

What is the purpose of helm delete --purge

Using helm is super cool, but what is the purpose of using helm delete --purge I can see the doc says:remove the release from the store and make its name free for later use So what is the purpose of saving the name and not releasing it with helm…
Chris G.
  • 23,930
  • 48
  • 177
  • 302