nordvpn

kubectl get pods sort by time

Kubernetes get pods sort by time

In this tutorial, I will show you how to get the kubectl get pods sort by time. Most of the time we want to get the pods in k8s but they are not sorted according to the date and time. So, we sort the kubernetes pods according to date.

Read Also: Get Kubernetes events according to date using kubectl

Read Also: Kubectl cheat sheet

Get kubectl pods sort by time

So let’s see how we can do that. First of all, let’s get pods.

kubectl get pods --sort-by=.metadata.creationTimestamp -n namespace

Pods in all namespaces

kubectl get pods --sort-by=.metadata.creationTimestamp -A

Please let me know if you like the tutorial.

Buy me a coffeeBuy me a coffee

Leave a Reply

Your email address will not be published.


*



The reCAPTCHA verification period has expired. Please reload the page.

48-Hour Flash Sale! Courses from just $10.99