gpt4 book ai didi

kubernetes - kubectl get all - 命令返回 - 限制请求

转载 作者:行者123 更新时间:2023-12-04 14:37:00 24 4
gpt4 key购买 nike

运行 kubectl get all返回限制请求错误
如何调试和修复此问题?

I0223 10:28:04.717522   44883 request.go:655] Throttling request took 1.1688991s, request: GET:https://192.168.64.2:8443/apis/apps/v1?timeout=32s
I0223 10:28:14.913541 44883 request.go:655] Throttling request took 5.79656704s, request: GET:https://192.168.64.2:8443/apis/authorization.k8s.io/v1?timeout=32s
I0223 10:28:24.914386 44883 request.go:655] Throttling request took 7.394979677s, request: GET:https://192.168.64.2:8443/apis/cert-manager.io/v1alpha2?timeout=32s
I0223 10:28:35.513643 44883 request.go:655] Throttling request took 1.196992376s, request: GET:https://192.168.64.2:8443/api/v1?timeout=32s
I0223 10:28:45.516586 44883 request.go:655] Throttling request took 2.79962307s, request: GET:https://192.168.64.2:8443/apis/rbac.authorization.k8s.io/v1?timeout=32s
I0223 10:28:55.716699 44883 request.go:655] Throttling request took 4.600430975s, request: GET:https://192.168.64.2:8443/apis/node.k8s.io/v1beta1?timeout=32s
I0223 10:29:05.717707 44883 request.go:655] Throttling request took 6.196503125s, request: GET:https://192.168.64.2:8443/apis/storage.k8s.io/v1?timeout=32s
I0223 10:29:15.914744 44883 request.go:655] Throttling request took 7.99827047s, request: GET:https://192.168.64.2:8443/apis/acme.cert-manager.io/v1alpha2?timeout=32s

最佳答案

要诊断 kubectl 命令,请在运行命令时选择详细级别。
如果您运行 kubectl -v=9你会得到大量的调试输出。
如果您查看那里,您可能会发现 .kube 中缓存目录的权限无效。

I0511 09:28:13.431116  260204 cached_discovery.go:87] failed to write cache to /home/$USER/.kube/cache/discovery/CLUSTER_NAME/security.istio.io/v1beta1/serverresources.json due to mkdir /home/$USER/.kube/cache/discovery: permission denied
为了解决这个问题,我只需设置允许写入缓存数据的权限。
chmod 755 -R ~/.kube/cache
这为我解决了问题-希望对其他人有所帮助。

关于kubernetes - kubectl get all - 命令返回 - 限制请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66339069/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com