If you need to sort a list of your pods by their CreationTimestamp, then do the following:

1
kubectl get pods -n kube-system --sort-by=metadata.creationTimestamp

A better way to specify the JSON path is:

1
kubectl get pods -n kube-system --sort-by='{.metadata.creationTimestamp}'