1. Introduction

helm show provides various information about a Helm chart. With its subcommands, we can get specific chart details, like custom resource definitions (CRDs) and values. We can also get all the information about the chart at once using the all subcommand.

In this tutorial, we discuss how to get chart information using helm show.

2. Getting a Chart’s Definition

To get a chart’s definition, we use the chart subcommand of helm show:

$ helm show chart [chart]

We can also use helm inspect in place of helm show:

$ helm inspect chart [chart]

Let’s get the definition of Bitnami’s Apache chart, oci://registry-1.docker.io/bitnamicharts/apache:

$ helm show chart oci://registry-1.docker.io/bitnamicharts/apache
Pulled: registry-1.docker.io/bitnamicharts/apache:10.2.4
Digest: sha256:edfd294077eb062cdf37c1b3c23997b8f5482d6c3bf7c0d0ed8755e51c48eb03
annotations:
  category: Infrastructure
  images: |
    - name: apache-exporter
      image: docker.io/bitnami/apache-exporter:1.0.3-debian-11-r2
    - name: apache
      image: docker.io/bitnami/apache:2.4.58-debian-11-r3
    - name: git
      image: docker.io/bitnami/git:2.43.0-debian-11-r0
  licenses: Apache-2.0
apiVersion: v2
...truncated...
name: apache
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/apache
version: 10.2.4

In case the chart’s repo is not installed, and we don’t have its OCI URL, we can get its information by specifying the repo URL using the –repo flag:

$ helm show chart grafana --repo https://grafana.github.io/helm-charts
...truncated...
name: grafana
sources:
- https://github.com/grafana/grafana
- https://github.com/grafana/helm-charts
type: application
version: 7.2.0

Then, if the repository is private, we can specify its credentials using the –username and –password flags for username and password, respectively.

By default, helm show chart will return the definition of the latest chart version. However, we can get a specific version of a chart’s definition using the –version flag:

$ helm show chart oci://registry-1.docker.io/bitnamicharts/apache --version 10.0.0
Pulled: registry-1.docker.io/bitnamicharts/apache:10.0.0
Digest: sha256:3d66e53a16eb5c444161ee463a03806737e84b72e8077d8addb101b45e402311
annotations:
  category: Infrastructure
  licenses: Apache-2.0
apiVersion: v2
appVersion: 2.4.57
...truncated...
sources:
- https://github.com/bitnami/charts/tree/main/bitnami/apache
version: 10.0.0

3. Getting a Chart’s CRDs

To illustrate how to get information about a Helm chart’s CRD, we’ll add a custom manifest to Grafana’s Helm chart. First, let’s do a sparse-checkout of the grafana chart subdirectory:

$ git clone --depth=1 https://github.com/grafana/helm-charts
$ cd helm-charts
$ git sparse-checkout set charts/grafana

Then, let’s cd to the grafana subdirectory:

$ cd charts/grafana/

In there, let’s create the crds directory using mkdir:

$ mkdir crds

Then, let’s cd into crds and create a manifest, app.yml. Let’s cat app.yml:

$ cat app.yml
apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: cms
  name: app-deployment
  labels:
    app: app
spec:
  replicas: 1
  selector:
    matchLabels:
      app: app
  template:
    metadata:
      labels:
        app: app
    spec:
      containers:
      - name: app
        image: httpd
        ports:
        - containerPort: 80

Now, let’s get CRD information from our custom grafana chart using helm show crds:

$ helm show crds /home/baeldung/helm-charts/charts/grafana/
apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: cms
  name: app-deployment
  labels:
    app: app
...truncated...
    spec:
      containers:
      - name: app
        image: httpd
        ports:
        - containerPort: 80

As seen above, when we ran helm show crds on the chart, it returned the same content as app.yml, the manifest we defined earlier.

We specified our chart as a file path because it was available locally.

helm show crds supports pretty much the same flags as helm show chart. So, we can use the –repo,–username,–password, and –version flags here, too.

4. Getting a Chart’s Values

We can get a chart’s values by running the helm show values command:

$ helm show values [chart]

Let’s get the values of the Bitnami’s Apache chart:

$ helm show values oci://registry-1.docker.io/bitnamicharts/apache
Pulled: registry-1.docker.io/bitnamicharts/apache:10.2.4
Digest: sha256:edfd294077eb062cdf37c1b3c23997b8f5482d6c3bf7c0d0ed8755e51c48eb03
...truncated...
global:
  imageRegistry: ""
  ## E.g.
  ## imagePullSecrets:
  ##   - myRegistryKeySecretName
  ##
  imagePullSecrets: []
  storageClass: ""

...truncated...
image:
  registry: docker.io
  repository: bitnami/apache
  tag: 2.4.58-debian-11-r3
  digest: ""
...truncated...

Like other helm show subcommands, we can use the –repo–version–username, and –password flags with the values subcommand.

5. Getting a Chart’s README

Using helm show readme, we can get the README of a Helm chart:

$ helm show readme oci://registry-1.docker.io/bitnamicharts/apache
Pulled: registry-1.docker.io/bitnamicharts/apache:10.2.4
Digest: sha256:edfd294077eb062cdf37c1b3c23997b8f5482d6c3bf7c0d0ed8755e51c48eb03
<!--- app-name: Apache -->

# Bitnami package for Apache

Apache HTTP Server is an open-source HTTP server. The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards.

[Overview of Apache](https://httpd.apache.org/)

Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.

...truncated...

Next, we’ll do the same for the grafana chart, which isn’t installed on our machine:

$ helm show readme grafana --repo https://grafana.github.io/helm-charts
# Grafana Helm Chart

* Installs the web dashboarding system [Grafana](http://grafana.org/)

## Get Repo Info

```console
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update
```

_See [helm repo](https://helm.sh/docs/helm/helm_repo/) for command documentation._

## Installing the Chart

To install the chart with the release name `my-release`:

```console
helm install my-release grafana/grafana
```

...truncated...

6. Getting All Chart Information

To get all the chart information in one output, we’ll use helm show all:

$ helm show all oci://registry-1.docker.io/bitnamicharts/apache
...truncated...
annotations:
  category: Infrastructure
  images: |
    - name: apache-exporter
      image: docker.io/bitnami/apache-exporter:1.0.3-debian-11-r2
...truncated...

---
...truncated...
image:
  registry: docker.io
  repository: bitnami/apache
  tag: 2.4.58-debian-11-r3
  digest: ""
...truncated...

---
<!--- app-name: Apache -->

# Bitnami package for Apache

Apache HTTP Server is an open-source HTTP server. The goal of this project is to provide a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards.

...truncated...

Since it returns all information of a chart, the output of helm show all is typically long. However, each section is separated from the next by a triple-dash document separator, .

7. Conclusion

In this article, we showed how to get a chart’s definition, values, CRDs, and README, using helm show‘s chartvaluescrds, and readme subcommands, respectively. Then, we described how to get all the information at once using helm show all.