Last active
September 27, 2022 07:11
-
-
Save rdkls/346f681fed749c7f6ba832447ccdb3d7 to your computer and use it in GitHub Desktop.
fish script to run a command on all pods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for pod in (kubectl get pods --field-selector=status.phase=Running --no-headers -o custom-columns=":metadata.name") | |
echo $pod | |
kubectl exec -ti $pod -- ping 1.1.1.1 -W1 -c1 -q >/dev/null | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment