robscott / kube-capacity

A simple CLI that provides an overview of the resource requests, limits, and utilization in a Kubernetes cluster
Apache License 2.0
2.13k stars 115 forks source link

Option -p should print sidecar containers resource usage #157

Open YvesZelros opened 3 months ago

YvesZelros commented 3 months ago

Kubernetes v1.29 have introduce sidecar containers

https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/

Sidecar containers are used as exemple by istio

kube-capacity -p should print sidecar containers resource usage

Note: sidecar containers are visible with kubectl top pods --containers=true

ahmetb commented 2 months ago

I also agree that this project should take initContainers as well as sidecar containers into account. There's non trivial calculation that goes into calculating what stage the container in, how much does that initContainer –or containers[]+sidecars[] request.