Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## List pods Sorted by Restart Count
- `kubectl get pods --sort-by='.status.containerStatuses[0].restartCount'`
- ## Check which nodes are ready
- `JSONPATH='{range .items[*]}{@.metadata.name}:{range @.status.conditions[*]}{@.type}={@.status};{end}{end}' \
- && kubectl get nodes -o jsonpath="$JSONPATH" | grep "Ready=True"`
- ## List Events sorted by timestamp
- `kubectl get events --sort-by=.metadata.creationTimestamp`
- ## Get a pod's YAML
- `kubectl get pod my-pod -o yaml `
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement