loading OpenAPI spec for v1beta1.metrics.k8s.io failed with: failed to retrieve openAPI spec, http error: ResponseCode: 503, Body: service unavailable, Header:[问题解决]

安装 metrics-server 一直无法正常使用,日志报这个

loading OpenAPI spec for v1beta1.metrics.k8s.io failed with: failed to retrieve openAPI spec, http error: ResponseCode: 503, Body: service unavailable, Header: map[Content-Type:[text/plain; charset=utf-8] X-Content-Type-Options:[nosniff]]

我在下面的 issues 找到了解决办法:

https://github.com/kubernetes-sigs/metrics-server/issues/129

stackoverflow 的解答

https://stackoverflow.com/questions/54106725/docker-kubernetes-mac-autoscaler-unable-to-find-metrics

这里好像是忽略了 不安全的证书认证,生产不建议这样搞, issues 看到有人讲这样不安全。

posted @ 2023-01-16 02:46  山河已无恙  阅读(1603)  评论(0编辑  收藏  举报