I can sort my Cuban cubes by name using:
kubectl get pods --sort-by=.metadata.name
How can I sort them (or other resources) by age using kubectl ?
kubectl
Pods have a status that you can use to find out startTime.
I think something like kubectl get po --sort-by=.status.startTime should work.
kubectl get po --sort-by=.status.startTime
You can also try kubectl get po --sort-by='{.firstTimestamp}' .
kubectl get po --sort-by='{.firstTimestamp}'
Also, apparently, version 1.7 cancels sorting.
https://github.com/kubernetes/kubectl/issues/43
Here's the error report: https://github.com/kubernetes/kubernetes/issues/48602
Here's the PR: https://github.com/kubernetes/kubernetes/pull/48659/files