0
votes

I am using helm to deploy my applications which has deployments, pods and jobs and others. Is there any way to get "kubectl describe" output of all objects loaded by "helm install" ?

3
yes objects installed via helm has a common label you can use that to describe all objects with that label. kubectl describe po -l chart=chart-nameTarun Khosla
"kubectl get all -l chart=myb5 -n myb5" doesn't give you the associated resources?François
Also applications deployed by helm have this label also app.kubernetes.io/managed-by: helm . Since this chart is made be you in local you can add the labels yourself also.Tarun Khosla
Helm 3 provide "get" subcommand, particulary might help helm get manifest <release-name>Panoptik
The François suggestion is good, it works for you? @François, you can post as an answer and elaborate a bit more, what do you think?Mr.KoopaKiller

3 Answers

2
votes

Tell me if it is working, but I tried with my helm charts (custom one, ES and kibana).

TL;DR

kubectl get all -l chart=myb5 -n myb5

-n stands for namespace -l stands for label

Explanations

Labeling your kubernetes objects is really important, and most of the helm charts out there are using labels to easily access and select objects.

When you install a chart, it adds a label such chart=my-chart-name. If the chart is not using it (maybe you are creating one for yourself), it is a good practice to add it.

So querying all resources with get all should retrieve all the resources created in the default namespace.

Depending where you installed your helm chart, it is good to add the namespace field in your query.

Note that if you use 1 namespace for only 1 helm chart resources, you do not need to filter with labels.

PS: should work the same with describe ;)

Best,

0
votes

Since you're using helm install, i assume your Chart's resources are installed into a specific namespace.

In that case, you can simply use the command kubectl describe all -n <your-namespace>. Its output should be the same as using kubectl describe on each resource of your Helm Chart.

0
votes

kubectl describe all -l chart=<chartName> -n namespace

or

kubectl get events -n namespace -w