Skip to content

Instantly share code, notes, and snippets.

@rbtr
Created August 27, 2018 16:10
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save rbtr/43bb60874f67443ea909b6d56537d242 to your computer and use it in GitHub Desktop.
Save rbtr/43bb60874f67443ea909b6d56537d242 to your computer and use it in GitHub Desktop.
sort kubernetes nodes by age
kubectl get nodes --sort-by=".status.conditions[?(@.reason == 'KubeletReady' )].lastTransitionTime"
@Aracki
Copy link

Aracki commented Sep 11, 2019

This one works also: kgn --sort-by=.metadata.creationTimestamp

@WladyX
Copy link

WladyX commented Jul 19, 2022

Thank you for sharing this! Still valid :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment