[英]Kubelet Rootfs.UsedBytes missing in /stats/summary in Minikube
we are consuming kubelet /stats/summary
endpoint.我们正在使用 kubelet
/stats/summary
端点。
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.特别是我们对
Rootfs.UsedBytes
中缺少但存在于其他环境中的minikube
感兴趣。
Command to retrieve /stats/summary
from kubelet, notice that the port can vary in different k8s flavours从 kubelet 中检索
/stats/summary
的命令,注意端口在不同的 k8s 风格中可能会有所不同
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,
...
}
EDIT:编辑:
It is possible that the issue is related to --driver=docker option of minikube
该问题可能与 minikube 的 --driver=docker 选项有关
To clarify I am posing community wiki answer.为了澄清我正在提出社区维基答案。
The problem here was resolved by changing driver to Hyperkit .通过将驱动程序更改为Hyperkit解决了这里的问题。
According to the documentation :根据文档:
HyperKit is an open-source hypervisor for macOS hypervisor, optimized for lightweight virtual machines and container deployment.
HyperKit是 macOS 管理程序的开源管理程序,针对轻量级虚拟机和容器部署进行了优化。
There are two ways to install HyperKit (if you have installed Docker for Desktop, you don't need to do anything - you already have HyperKit):有两种安装 HyperKit 的方法(如果你已经安装了 Docker for Desktop,你不需要做任何事情——你已经有了 HyperKit):
brew install hyperkit
See also this reference .另请参阅此参考资料。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.