for d in `kubectl -n your-namespace get deployments | grep -v NAME | awk '{print $1}'`; do kubectl -n your-namespace get deployment $d -o json > $d.json; done
for d in `kubectl -n your-namespace get deployments -o=name | cut -f2 -d'/'`; do kubectl -n your-namespace get deployment $d -o json > $d.json; done
kubectl -n your-namespace get deployments -o json > deployments.json