Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ergoz/2289db66e87914dc79936531ec1e2435 to your computer and use it in GitHub Desktop.
Save ergoz/2289db66e87914dc79936531ec1e2435 to your computer and use it in GitHub Desktop.
kubectl/jq - How to select/filter not `null` objects?
# List all deleted pods
kubectl get pods -o json | jq -r '.items[] | select(.metadata.deletionTimestamp != null)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment