Skip to content

Instantly share code, notes, and snippets.

@ipedrazas
Created April 9, 2018 15:23
Show Gist options
  • Save ipedrazas/dba99c97e4e8f7415974c7a202db4ab0 to your computer and use it in GitHub Desktop.
Save ipedrazas/dba99c97e4e8f7415974c7a202db4ab0 to your computer and use it in GitHub Desktop.
Running pods
kubectl get pods --all-namespaces -o json \
| jq -r '.items[] | \
select(.status.phase != "Running" or ([ .status.conditions[] | \
select(.type == "Ready" and .state == false) ] | length ) == 1 ) | \
.metadata.namespace + "/" + .metadata.name'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment