Skip to content

Instantly share code, notes, and snippets.

@dudash
Last active March 18, 2021 20:26
Show Gist options
  • Save dudash/4df9ecf484b0966def550fcd24b9de69 to your computer and use it in GitHub Desktop.
Save dudash/4df9ecf484b0966def550fcd24b9de69 to your computer and use it in GitHub Desktop.
OpenShift CLI get all the pods on all your nodes
#!/bin/bash
echo "--------------------------------------------------"
echo "ALL MY PODS"
echo "--------------------------------------------------"
oc get pods --all-namespaces
echo ""
echo "--------------------------------------------------"
echo "ALL MY PODS MAPPED SORTED BY NODE"
echo "--------------------------------------------------"
oc adm manage-node $(oc get nodes --no-headers -o custom-columns=name:.metadata.name) --list-pods
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment