Site icon installvirtual

Kubernetes Replicasets according to date

Kubernetes replica sets according to date using kubectl

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

Read Also: Get Kubernetes events according to date using kubectl

Read Also: Kubectl cheat sheet

Get Kubernetes ReplicaSets

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

kubectl get replicasets -n monitoring

The above command will show you the replicasets from the monitoring namespace.

Read Also: Kubernetes get pods on a Specific Node

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

The above command will show all the replicasets from all the namespaces with the timestamp. It’s really easy to see the sorted replicasets.

Please let me know how you liked the article. For more articles like this please comment below.

 

Buy me a coffee

 

Exit mobile version