How to get information about scaled up pods in a Kubernetes cluster

5/24/2021

I have a Kubernetes cluster and I am figuring out in what numbers have pods got scaled up using the Kubectl command.

what is the possible way to get the details of all the scaled-up and scaled-down pods within a month?

-- Sudarshan Sharma
google-cloud-platform
google-kubernetes-engine
kubernetes

2 Answers

5/24/2021

If you have k8s audit Policy in place, you can find the Events that are passed through the k8s API by filtering them in Cloud Audit Logs or elasticsearch! it depends on you current setup!

-- Mohamed chiheb Ben jemaa
Source: StackOverflow

5/24/2021

That is not information Kubernetes records. The Events system keeps some debugging messages that include stuff about pod startup and sometimes shutdown, but that's only kept for a few hours. For long term metrics look at something like Prometheus + kube-state-metrics.

-- coderanger
Source: StackOverflow