I want to know the share of resource - cpu, memory- per kubernetes's pod. And I want to know what the standard of share is
You can use metrics server which is the Cluster-wide aggregator of resource usage data. It is the source of container resource metrics for Kubernetes built-in autoscaling pipelines. It collects resource metrics from Kubelets and exposes them in Kubernetes apiserver. You can also access the metrics API by kubectl top
.
Another solution is using Prometheus as suggested by @jankantert.
Try kubectl top
and friends. More words because SO requires them.
This is hard to do using kubectl only (or I don't know how). What we usually do is to use the kubelet metric-server to export all metric to prometheus. We then use Grafana to calculate those values. The following metrics should allow you to calculate your values:
CPU cores:
Memory:
You can filter those by label (i.e. by pod name or namespace) and calculate all kinds of things based on them.