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
35
votes
9 answers

Helm: Error: no available release name found

I am getting a couple of errors with Helm that I can not find explanations for elsewhere. The two errors are below. Error: no available release name found Error: the server does not allow access to the requested resource (get configmaps) Further…
cjp
  • 363
  • 1
  • 3
  • 4
34
votes
3 answers

Helm templating doesn't let me use dash in names

I am creating a helm chart for my app. In the templates directory, I have a config-map.yaml with this in it {{- with Values.xyz }} xyz.abc-def: {{ .abc-def }} {{- end }} When I try to run helm install I get a Error: parse error in…
user1729409
  • 587
  • 2
  • 6
  • 10
34
votes
4 answers

Helm - Templating variables in values.yaml

I'm trying to template variables from a map inside the values.yaml into my final Kubernetes ConfigMap YAML. I've read through https://github.com/helm/helm/issues/2492 and https://helm.sh/docs/chart_template_guide/ but can't seem to find an…
ahstn
  • 471
  • 1
  • 4
  • 6
34
votes
4 answers

Helm range without leaving global scope

I need to loop through a list of instances and create 1 stateful set for every instance. However, inside range I then limit myself to the scope of that loop. I need to access some global values in my statefulset. I've solved it by just putting all…
LoganHenderson
  • 1,222
  • 4
  • 12
  • 24
34
votes
4 answers

Why helm upgrade --install failed when previous install is failure?

This is the helm and tiller version: > helm version --tiller-namespace data-devops Client: &version.Version{SemVer:"v2.9.1", GitCommit:"20adb27c7c5868466912eebdf6664e7390ebe710", GitTreeState:"clean"} Server: &version.Version{SemVer:"v2.9.1",…
Agung Pratama
  • 3,666
  • 7
  • 36
  • 77
34
votes
4 answers

How to set multiple values with helm?

Use helm install can set value when install a chart like: helm install --set favoriteDrink=slurm ./mychart Now want to set value like: helm install --set aws.subnets="subnet-123456, subnet-654321" ./mychart But failed: Error: failed parsing --set…
online
  • 4,919
  • 10
  • 32
  • 47
34
votes
8 answers

Helm: generate comma separated list

Using Helm templates, I'm trying to generate a list of server names based on a number in values.yaml. The dot for this template is set to the number (its a float64). {{- define "zkservers" -}} {{- $zkservers := list -}} {{- range int . | until…
alfred
  • 639
  • 1
  • 6
  • 11
34
votes
2 answers

Helm _helpers.tpl: Calling defined templates in other template definitions

Helm _helpers.tpl? Helm allows for the use of Go templating in resource files for Kubernetes. A file named _helpers.tpl is usually used to define Go template helpers with this syntax: {{- define "yourFnName" -}} {{- printf "%s-%s" .Values.name…
Noah Huppert
  • 4,028
  • 6
  • 36
  • 58
33
votes
14 answers

How to use ConfigMap configuration with Helm NginX Ingress controller - Kubernetes

I've found a documentation about how to configure your NginX ingress controller using ConfigMap: https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/ Unfortunately I've no idea and couldn't find it anywhere how to…
33
votes
1 answer

Why is "{{.Release.namespace}}" rendered empty?

I understand that {{.Release.namespace}} will render the namespace where the application being installed by helm. In that case, helm template command will render it as empty string (since it doesn't know yet the release namespace). However, what…
Agung Pratama
  • 3,666
  • 7
  • 36
  • 77
33
votes
4 answers

Helm: How to Override Value with Periods in Name

I am trying to script setup of Jenkins so that I can create and tear down Jenkins clusters programmatically with helm. I've hit an annoying snag where I cannot set a key with dots in the name. My helm values.yaml file looks like this: --- rbac: …
pnovotnak
  • 4,341
  • 2
  • 27
  • 38
32
votes
9 answers

Let's Encrypt kubernetes Ingress Controller issuing Fake Certificate

Not Sure why I'm getting Fake certificate, even the certificate is properly issued by Let's Encrypt using certmanager The setup is running on the Alibaba Cloud ECS console, where one Kube-master and one cube-minion form a Kubernetes…
anish
  • 6,884
  • 13
  • 74
  • 140
31
votes
10 answers

Error: Kubernetes cluster unreachable: Get "http://localhost:8080/version?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused

I am trying to deploy my application into Rancher managed kubernetes cluster RKE. I have created pipeline in gitlab using auto devops. But when the helm chart is trying to deploy I get this error. Error: Kubernetes cluster unreachable: Get…
merla
  • 489
  • 1
  • 5
  • 12
31
votes
1 answer

why dash is used in condition Go templates

I've seen many examples of dash being use for if statements ("{{- if.."), e.g: {{- if hasKey .Values.mymap "mykey" }} # do something conditional here... {{- end }} what is the purpose of the dash in that statement?
amit
  • 2,171
  • 4
  • 31
  • 50
31
votes
2 answers

helm init has been removed in version 3

The command helm init does not work any longer as of version 3. Running helm --help lists all available commands, amongst which init is no longer present. Why is that?
aboger
  • 2,214
  • 6
  • 33
  • 47