Description
What would you like to be added?
Please add support for the following usage patterns:
bashCopyEditkubectl rollout restart --all kubectl rollout restart --all --all-namespaces
These would restart all rollout-capable resources (e.g., Deployment
, StatefulSet
, DaemonSet
, possibly ReplicaSet
) either:
-
in the current namespace (
--all
), or -
across the whole cluster (
--all --all-namespaces
).
This would make rollout restart
behave consistently with other kubectl
verbs like get
, describe
, delete
, etc., which allow generic use of --all
and --all-namespaces
.
Why is this needed?
Today, if I want to restart everything in a namespace or cluster, I need to write scripts like:
bashCopyEditkubectl get deployments,statefulsets,daemonsets --all-namespaces -o name \ | xargs -n1 kubectl rollout restart
This is:
-
Inelegant
-
Not aligned with kubectl CLI ergonomics
-
Difficult to remember for newcomers or use in CI pipelines
There is no natural or native equivalent to:
bashCopyEditkubectl delete pods --all --all-namespaces
But there should be a safe, controller-respecting alternative that uses rollout restart
.
Benefits:
-
Safer cluster-wide restarts after config changes
-
Improved automation and scripting
-
Better developer experience
-
Prevents misuse of
kubectl delete pods
Suggested Behavior:
Example Use Cases:
-
Restart everything after ConfigMap or Secret change
-
CI/CD rollback or redeploy logic
-
Cluster-wide rolling restarts in dev/test environments
-
Reboot mitigation without deleting pods
Would you like me to submit this issue on your behalf, or would you like to submit it yourself with this content?