kube-apiserver不规律报loading OpenAPI spec for “v1beta1.metrics.k8s.io“ failed with: failed to retrieve
k8s apiserver错误日志一真报以下错误,但是metricserver组件是正常的。loading OpenAPI spec for "v1beta1.metrics.k8s.io" failed with: failed to retrieve openAPI spec, http error: ResponseCode: 503, Body: Error trying to reach
k8s apiserver错误日志一真报以下错误,但是metricserver组件是正常的。
node,pods的相关指标都可以正常显示
相关错误日志内容如下:
loading OpenAPI spec for “v1beta1.metrics.k8s.io” failed with: failed to retrieve openAPI spec, http error: ResponseCode: 503, Body: Error trying to reach service: ‘read tcp 10.0.0.198:44512->10.0.0.198:443: read: connection reset by peer’, Header: map[Content-Type:[text/plain; charset=utf-8] X-Content-Type-Options:[nosniff]]
解决:
apiserver配置文件添加配置并重启:–enable-aggregator-routing=true
"此外,为了最大限度地提高这种高可用性配置的效率,建议将——enable- aggregate -routing=true CLI标志添加到kube-apiserver,这样发送到Metrics Server的请求就可以在两个实例之间实现负载平衡。 "
这段话看起来跟这个问题没有什么关联。。。
更多推荐
所有评论(0)