Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (12.7k points)
hi i want to sort my pods based on their age is there anyway to do it  ?

1 Answer

0 votes
by (29.5k points)

Hi, the --sort token has been a little bit broken since the update 1.7. In my experience, found that using metadata is the most reliable method of sorting pods by age.

You can use the following command to solve your problem

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

to learn more about Kubernetes architecture you can refer the tutorial below 

Related questions

0 votes
1 answer
0 votes
1 answer
+1 vote
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...