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
31
votes
4 answers

Validating helm chart content

I am developing a chart and I had an error in it—incorrectly placed imagePullSecrets. When I tried to install it via helm install ./mychart the misplaced element was simply ignored and I wondered what is wrong. When I did helm template ./mychart |…
Jan Hudec
  • 73,652
  • 13
  • 125
  • 172
30
votes
4 answers

helm error when updating: UPGRADE FAILED: The order in patch list

I have a problem with helm deployment. It has happend after I have added a new environment variable to the deployment. When I execute: helm upgrade [RELEASE] [CHART] I get the following error: Error: The order in patch list: [ map[name:APP_ENV…
pcampana
  • 2,413
  • 2
  • 21
  • 39
30
votes
7 answers

How best to say a value is required in a helm chart?

I am doing this now: value: {{ required "A valid .Values.foo entry required!" .Values.foo }} But to give this same message for all required values in the templates is cumbersome and clutters the templates in my opinion. Is there a better way where…
Chillax
  • 4,418
  • 21
  • 56
  • 91
30
votes
2 answers

go-template split string by delimiter

I have my own helm chart and I'm trying to perform split without using the _helpers.tpl in one line my values.yaml file content: deployment: domain: my.domain I need to split domain name in my template file: my.domain I have tried to perform…
dsaydon
  • 4,421
  • 6
  • 48
  • 52
29
votes
3 answers

helm list all installed charts

How can I list, show all the charts installed by helm on a K8s? If I run helm in a newly installed Ubuntu I cannot see which repos were used before to install the charts. Kind of helm show all * Can I somehow export the helm's repository list…
Kenot Solutions
  • 377
  • 1
  • 4
  • 11
29
votes
2 answers

What is the difference between fullnameOverride and nameOverride in Helm?

I could find both fullnameOverride and nameOverride in Helm chart.Please help clarifying what is the difference between these two with an example.
Rad4
  • 1,936
  • 8
  • 30
  • 50
28
votes
3 answers

uninstall: Release not loaded: new: release: not found, chart deployed using helm 3

I have both helm 2 and helm 3 installed in my localhost. I have created a new chart using helm2 sanket@Admins-MacBook-Pro poc % helm create new Creating new created a chart 'new ' using helm version 2. Now I have deployed the chart using helm…
Sanket Singh
  • 585
  • 1
  • 6
  • 11
28
votes
4 answers

Helm conditionally install subchart

Is there a way to conditionally install a helm subchart based on global values.yaml? I've all my internal services and components as subcharts, and one of them is a messagequeue chart. In my dev and test environment (local k8s), I use RabbitMQ, and…
Narayana
  • 2,654
  • 3
  • 32
  • 32
28
votes
2 answers

Setting nested data structures from helm command line?

I'm installing the prometheus-redis-exporter Helm chart. Its Deployment object has a way to inject annotations: # deployment.yaml ... template: metadata: annotations: {{ toYaml .Values.annotations | indent 8 }} Typically if I was…
Cory Klein
  • 51,188
  • 43
  • 183
  • 243
28
votes
2 answers

How to create a helm chart to deploy multiple applications using the same value.yaml file

I'm trying to deploy an HTTPD instance and a couch db instance using the same values.yaml file Is there a default document that can help me understand how to deploy two instances and there services using the same values.yaml file? Anyone with a…
anish anil
  • 2,299
  • 7
  • 21
  • 41
28
votes
5 answers

How can you call a helm 'helper' template from a subchart with the correct context?

Helm charts define helper templates in _helpers.tpl which are used to create normalized names for the services. The standard form of the template for a service (DNS) name is: {{- define "postgresql.fullname" -}} {{- $name := default .Chart.Name…
moreginger
  • 530
  • 1
  • 5
  • 10
27
votes
1 answer

What is the difference between helm syntax {{ something }} and {{- something }}?

I'm trying to understand helm templates and found syntax like this: {{- if not .Values.autoscaling.enabled }} replicas: {{ .Values.replicaCount }} {{- end }} So I thought every thing had to start with {{- but then I found other syntax that…
PatS
  • 8,833
  • 12
  • 57
  • 100
27
votes
2 answers

helm init failed is not a valid chart repository or cannot be reached: Failed to fetch 403 Forbidden

is not a valid chart repository or cannot be reached: Failed to fetch https://kubernetes-charts.storage.googleapis.com/index.yaml : 403 Forbidden helm init start failing today, we are using helm version HELM_VERSION: v2.13.0 in our CI/CD. Adding…
Adiii
  • 54,482
  • 7
  • 145
  • 148
27
votes
3 answers

Invalid spec selector after upgrading helm template

I've upgraded helm templates (by hand) Fragment of previous depoloyment.yaml: apiVersion: apps/v1beta2 kind: Deployment metadata: name: {{ template "measurement-collector.fullname" . }} labels: app: {{ template "measurement-collector.name" .…
pixel
  • 24,905
  • 36
  • 149
  • 251
27
votes
3 answers

Helm Subchart order of execution in an umbrella chart

I have an umbrella chart with multiple sub-charts, I simply want to make sure that subchart1 runs before subchart2, etc. How can we define the order of subchart execution? Seems like hook-weights only apply relative to the chart that declares them.
Z Y .
  • 313
  • 1
  • 3
  • 6