I would love to list deployments having mongodb
environment value along with their phase status. Is there anyway to do so?
With this command, I get the deployments name which carries a specific environment value
kubectl get deploy -o=custom-columns="NAME:.metadata.name,SEC:.spec.template.spec.containers[*].env[*].value" | grep mongodb | cut -f 1 -d ' '
Output:
app1
app2
app3
app4
Output I want to get:
NAME READY UP-TO-DATE AVAILABLE AGE
app1 1/1 1 1 125d
app2 1/1 1 1 248d
app3 1/1 1 1 248d
app4 1/1 1 1 248d
Or it can be pods as well. I'd appreciate your help.
Thank you!