When base64 encoding should be used with deploying using helm

8/16/2019

I've seen some examples of helm charts and it looks like some values are encoded to base64 ({{ .Values.name | b64enc }}).
Why and when should it be used?

-- SagiLow
kubernetes
kubernetes-helm

1 Answer

8/16/2019

In most cases, you will see them used when creating Secret objects. This is because secrets use base64 encoding by default.

You can have a look at a secret in ChartMuseum's stable helm chart to verify.

Another usage is on webhook configurations. Webhook definitions have a caBundle field, which requires a PEM certificate. Since PEM certificates are base64 encoded DER certificates, it is also common to see b64enc there as well. An example from the stable Helm chart of Stash.

You can discover more use cases on the Helm charts repository, by searching for b64enc usages.

-- Utku Ă–zdemir
Source: StackOverflow