https://rancher.com/ logo
Title
b

bland-translator-58922

10/18/2022, 11:24 AM
Hi I have a question, I'm running an EKS cluster within rancher with 7 nodes attached and a lot of cronjobs running. I noticed the pod capacity is always over 100% as seen in the image below. When looking through all pods I can see there are a lot of pods with
errored
or
completed
status from past jobs. The last 3 jobs from the crons will be saved along with the failed ones. Is there a way to filter these out on the cluster overview to actually see how many running pods there are in the cluster?
a

ancient-raincoat-46356

10/18/2022, 3:40 PM
Just a regular user myself but I found this online that does help with reporting the Pod usage on the Overview screen.
kubectl delete pod $(kubectl get pods | egrep 'Completed|Error|ContainerStatusUnknown' | awk '{print $1}')
You can edit the
egrep
to remove only what you want and you can add
--all-namespaces
to affect pods outside of your current namespace context