Bài này chỉ cách check ram/cpu mà pod đang sử dụng.
kubectl top pod podname --namespace=default
error: Metrics not available for pod default/podname
Check pods cpu/memory usage without installing any third party tool then you can get memory and cpu usage of pod from group.
- Go to pod’s exec mode
kubectl exec -it pod_name -- /bin/bash
- Run
cat /sys/fs/cgroup/cpu/cpuacct.usage
for cpu usage - Run
cat /sys/fs/cgroup/memory/memory.usage_in_bytes
for memory usage.