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?
Here is the right command:
kubectl get deploy --all-namespaces -o custom-columns='NAME:metadata.name,ENV:spec.template.spec.containers[*].env[*].name'