I want to make same change in the yaml file for every deployment , Is there any way to make the change across all deployments present in a namespace in batch rather than one deployment at a time ?. I am currently using this syntax to edit yaml file of one deployment at a time -
kubectl edit deployment.v1.apps/nginx-deployment
kubectl get deployment -o name | sed -e 's/.*\///g' | xargs -I {} kubectl patch deployment {} --type=json -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/imagePullPolicy", "value": "Always"}]'