Rightsizing
Monitoring › Rightsizing compares the CPU and memory each running pod uses with its containers’ requests and limits, in the namespace chosen in the top bar or in every namespace. The tab appears when you may read metrics. KubeGlass doesn’t know your cloud prices; it shows what you can change.
Where the usage comes from
Section titled “Where the usage comes from”Usage comes from metrics-server, or from Prometheus for people with cluster-wide read access. It is the usage right now, not a history: metrics-server’s latest sample, or Prometheus’s CPU rate over the last five minutes and the current memory working set. Check the suggestions against a busy period before you apply them.
Usage is measured per pod, as the sum of its containers. Pods that have finished (Succeeded or Failed) are left out. When only some pods have usage data the page says how many, and without any it says that KubeGlass couldn’t read live usage.
What it suggests
Section titled “What it suggests”KubeGlass looks at every container of every pod, and one container can get several suggestions:
| Category | When | Severity | Suggestion |
|---|---|---|---|
| No requests | The container sets neither a CPU nor a memory request | Warning | Requests of 1.2 times current usage. The container gets no other suggestion |
| No limits | The container sets neither a CPU nor a memory limit | Info | None; the card says the container can use as much as the node has |
| Over-provisioned | CPU or memory usage is below half of the request | Warning | A request of 1.3 times current usage, at least 10m CPU or 64Mi memory, shown only when that is lower than the current request. CPU and memory each get a card of their own |
| Under-provisioned | CPU or memory usage is above 90% of the limit | Critical | A limit of 1.5 times current usage, for CPU and memory on separate cards |
A container with no usage data gets only the No requests and No limits suggestions.
The page
Section titled “The page”The cards at the top count the pods analyzed, the over- and under-provisioned suggestions, the containers with no requests, and the CPU and memory the over-provisioned suggestions would free. Critical suggestions come first, then warnings, then info. Filter by category and by severity.
Each suggestion is a card with the pod and container, the namespace, the category, why KubeGlass suggests it, the request and what is used, and the suggested value. The cards don’t link anywhere; to change a container, open its workload under Resources and edit it there.