In CNF world, measuring the CPU usage on a POD with usual commands for example, top command doesnot actually provide the POD's actual CPU usage, instead it will be like you run it on the host system/node because the pod is using kernel of the host system.
We have to periodically monitor the CPU usage inside the POD and throttle the traffic. Is there a way to measure the CPU usage inside the POD?
top command doesnot actually provide the POD's actual CPU usage, instead it provides the host system/node usage, because the pod is using kernel of the host system.
From the way you present the question I think you don't want the answer "install a monitoring stack consisting of Prometheus, Alertmanager and Grafana to monitor the infrastructure".
You could simply do these steps:
1.Log into the Pod
2.Run the command
for cpu usage
Take a look at this docs: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/resource_management_guide/sec-cpuacct
Checking kubernetes pod CPU and memory