We are consuming kubelet /stats/summary
endpoint.
We noticed that the metrics returned are not always present and might be missing in some scenarios.
In particular we are interested in Rootfs.UsedBytes
that in missing in minikube
but present in other environments.
Command to retrieve /stats/summary
from kubelet, notice that the port can vary in different k8s flavours
token=$(k get secrets <service-account-token-with-enough-privileges> -o json \
| jq .data.token -r | base64 -d -)
k run curler --rm -i --restart=Never --image nginx -- \
curl -X GET https://<nodeIP>:10250/stats/summary --header "Authorization: Bearer $token" --insecure
"pods": [
{
...
"containers": [
{
...
"rootfs": {
...
"usedBytes": 36864,
...
}
- Why is that?
- Is there a similar metric more reliable?
- Can add anything in Minikube to enable that?
EDIT:
It is possible that the issue is related to --driver=docker option of minikube