Reputation: 1639
Often there is more than one search result returned from /
filter command which is confirm by pressing Enter
. Then I can navigate the results, but have no way to filter based on data displayed e.g. Status or CPU.
QUESTION: Is this possible? If so, what I need to do to achieve it?
Upvotes: 20
Views: 13302
Reputation: 63
You can filter results using /
just like with :
As @dgebert said for sorting use SHIFT
+ first letter of keyword to sort by
Upvotes: 6
Reputation: 1484
I don't think it's possible to filter search result, but you can sort them, which can be helpful in most cases. For example:
Upvotes: 33
Reputation: 424
you can try something like this where replace ImagePullBackOff
with filter of your need
kubectl get pod -o=json | jq '.items[]|select(any( .status.containerStatuses[]; .state.waiting.reason=="ImagePullBackOff"))|.metadata.name'
Upvotes: 1