diff --git a/k8s/k8s-restart-all-pods-in-all-namespaces.sh b/k8s/k8s-restart-all-pods-in-all-namespaces.sh new file mode 100644 index 0000000..d106106 --- /dev/null +++ b/k8s/k8s-restart-all-pods-in-all-namespaces.sh @@ -0,0 +1,9 @@ +#!/bin/sh +# Nico Schottelius, 2026-06-26 + +for ns in $(kubectl get ns | awk '{ print $1 }'| grep -v '^NAME$'); do + for pod in $(kubectl get pods -n $ns | awk '{ print $1 }'| grep -v '^NAME$'); do + echo "Deleting pods $pod in namespace $ns ..." + kubectl delete pod -n $ns $pod + done +done