How to Convert Helm Chart to Kubernetes YAML

Bibin Wilson
DevOps Learners
Published in
2 min readMar 9, 2022

--

In this blog, you will learn to convert existing Helm chart templates to Kubernetes YAML manifests.

So, why would anyone want to convert a Helm template to a Kubernetes manifest?

If you look at a community helm chart, sometimes it’s confusing for beginners to understand all the components which the chart installs.

So, if you want to understand a community helm chart or learn each and every component that is part of a Helm chart, you can convert the helm chart to a kubernetes manifest.

Once you have the kubernetes YAML files, it is easy to comprehend and understand the helm chart.

Convert Helm Chart to Kubernetes YAML

Converting a Helm chart to kubernetes YAML is very easy.

You can use the helm native commands to achieve this.

In helm, there is a command called helm template. Using the template command you can convert any helm chart to a YAML manifest.

The resultant manifest file will have all the default values set in the helm values.yaml.

Ensure that you have helm installed to execute the template command.

We will use the Vault community helm chart to demonstrate this.

Ensure the helm repo is added first.

helm repo add hashicorp https://helm.releases.hashicorp.com

The following command converts the community vault helm chart to YAML.

helm template vault hashicorp/vault --output-dir vault-manifests/helm-manifests

In the above command,

  1. hashicorp/vaultis the chart name.
  2. vault-manifests/helm-manifests is the output directory where the YAMLs get stored.

Like this, you can convert any helm chart to Kubernetes YAML files.

Helm template command

To understand more about the helm template command, you can use the helm help command.

Execute the following command to get the help output.

helm template --help

Also, you can refer to the official helm template command documentation.

This post was originally published in https://scriptcrunch.com/convert-helm-chart-kubernetes-yaml/ by me.

--

--