Restart all deployment in a namespace

Not that I’m aware of. You’d want to do something like this:

deploys=`kubectl get deployments -n apps | tail -n1 | cut -d ' ' -f 1`
for deploy in $deploys; do
  kubectl rollout restart deployments/$deploy -n apps
done

Best,
-jay

2 Likes