const activeStyles = {
borderBottom: "2px solid orange", // Now it will work
border: "2px solid orange" // This does work
};
x.x.x.x是我的指标服务器svc ip地址(CLusterIP)
metrics-server pod中的日志
message: 'no response from https://x.x.x.x:443: Get https://x.x.x.x:443:
net/http: request canceled while waiting for connection (Client.Timeout exceeded
while awaiting headers)'
我总是使用heapster并将其替换为metrics-server。 指标服务器的来源为https://github.com/kubernetes-incubator/metrics-server/tree/master/deploy/1.8%2B
我已经阅读并尝试在Google中搜索,但这与我的日志错误无关。
我希望I0701 03:33:32.914871 1 serving.go:312] Generated self-signed cert (apiserver.local.config/certificates/apiserver.crt, apiserver.local.config/certificates/apiserver.key)
W0701 03:33:33.359803 1 authentication.go:296] Cluster doesn't provide requestheader-client-ca-file in configmap/extension-apiserver-authentication in kube-system, so request-header client certificate authentication won't work.
I0701 03:33:33.390768 1 manager.go:95] Scraping metrics from 0 sources
I0701 03:33:33.391217 1 manager.go:150] ScrapeMetrics: time: 1.237µs, nodes: 0, pods: 0
I0701 03:33:33.404222 1 secure_serving.go:116] Serving securely on [::]:443
或kubectl top pod
运行良好。但是,由于我应用了metrics-server,因此无法执行那些命令。
同时,我删除了metrics-server apiservice,一切正常。但是,是的,我仍在使用heapster。
有人可以帮助我做到这一点或启发我吗?
答案 0 :(得分:0)
但是,如果要使用metrics-server来解决此问题,请编辑metrics-server-deployment.yaml
并在
图片:k8s.gcr.io/metrics-server-amd64:v0.3.1 行:
command:
- /metrics-server
- --kubelet-insecure-tls
- --kubelet-preferred-address-types=InternalIP
然后使用以下命令重新应用文件:
$ kubectl apply -f metrics-server-deployment.yaml
几秒钟后,您可以通过
获取指标$ kubectl get --raw "/apis/metrics.k8s.io/v1beta1/nodes"
或
$ kubectl top node
命令。
您可以在这里找到更多信息:metrics-server-issue。