Using kubectl to Get Helm Release Information

kubectl Helm Kubernetes releases secrets CLI

2 min read | by Jordi Prats

While Helm provides the convenient helm ls -A command to list all releases across namespaces, there are situations where helm CLI might not be available. We can still retrieve similar information out of the helm metadata stored as Kubernetes secrets.

$ helm ls -A
NAME            NAMESPACE       REVISION    UPDATED                                    STATUS      CHART                   APP VERSION
metrics-server  kube-system     1           2025-07-14 10:00:16.115363827 +0000 UTC    deployed    metrics-server-1.0.0    0.1.0
prometheus      monitoring      2           2025-07-14 10:05:45.362196303 +0000 UTC    deployed    prometheus-2.0.0        0.2.0
my-app          default         3           2025-07-14 10:10:46.213184797 +0000 UTC    deployed    my-app-1.2.3            0.3.0

Helm v3 stores release information as secrets in the same namespace as the release. Each Helm release creates a secret with specific labels that contain metadata about the deployment. Instead of using helm ls -A, you can achieve similar results with the following kubectl command:

$ kubectl get secrets -A -l owner=helm -o custom-columns="NAMESPACE:.metadata.namespace,NAME:.metadata.labels.name,STATUS:.metadata.labels.status,REVISION:.metadata.labels.version"
NAMESPACE     NAME              STATUS     REVISION
kube-system   metrics-server    deployed   1
monitoring    prometheus        deployed   2
default       my-app            deployed   3

We are filtering the secrets using the label owner=helm, which Helm automatically applies to its release secrets. The command uses -o custom-columns to format the output, allowing us to specify which fields to display. The labels that we are going to use in this case are:

  • NAMESPACE: .metadata.namespace shows the namespace where the release is deployed.
  • NAME: .metadata.labels.name displays the release name from the Helm secret's labels.
  • STATUS: .metadata.labels.status shows the current status (deployed, failed, etc.)
  • REVISION: .metadata.labels.version indicates the current revision number.

In case we want to include this information in a pipeline or script, we can also output it in JSON format:

$ kubectl get secrets -A -l owner=helm -o json | jq '.items[] | {namespace: .metadata.namespace, name: .metadata.labels.name, status: .metadata.labels.status, revision: .metadata.labels.version}'
{
  "namespace": "kube-system",
  "name": "metrics-server",
  "status": "deployed",
  "revision": "1"
},
{
  "namespace": "monitoring",
  "name": "prometheus",
  "status": "deployed",
  "revision": "2"
},
{
  "namespace": "default",
  "name": "my-app",
  "status": "deployed",
  "revision": "3"
}

Posted on 14/07/2025

Categories