cusl
cusl

Reputation: 63

Get variables of every deployment in cluster

I'm trying to make a list of all deployments' variables in kubernetes cluster with kubectl command. I'm doing something like

kubectl get deploy --all-namespaces -o custom-columns='NAME:metadata.name,ENV:spec.template.spec.containers.env.name'

but something always go wrong. How should I write kubectl command to get table of deployments and their variables with values?

Upvotes: 0

Views: 239

Answers (1)

Yiadh TLIJANI
Yiadh TLIJANI

Reputation: 81

Here is the right command:

kubectl get deploy --all-namespaces -o custom-columns='NAME:metadata.name,ENV:spec.template.spec.containers[*].env[*].name'

Upvotes: 3

Related Questions