K8s部署metric-server页面不显示,报错unable to fully scrape metrics
2021-04-30 14:30:16浏览数 (1)
日志报错内容
代码语言:javascript复制
[root@k8s-master1 ~]#kubectl logs -n kube-system metrics-server-77f9d68d78-s6drm
I0428 02:36:28.023963 1 serving.go:325] Generated self-signed cert (/tmp/apiserver.crt, /tmp/apiserver.key)
I0428 02:36:28.863903 1 requestheader_controller.go:169] Starting RequestHeaderAuthRequestController
I0428 02:36:28.863936 1 configmap_cafile_content.go:202] Starting client-ca::kube-system::extension-apiserver-authentication::requestheader-client-ca-file
I0428 02:36:28.863963 1 shared_informer.go:240] Waiting for caches to sync for RequestHeaderAuthRequestController
I0428 02:36:28.863980 1 shared_informer.go:240] Waiting for caches to sync for client-ca::kube-system::extension-apiserver-authentication::requestheader-client-ca-file
I0428 02:36:28.863916 1 configmap_cafile_content.go:202] Starting client-ca::kube-system::extension-apiserver-authentication::client-ca-file
I0428 02:36:28.864275 1 shared_informer.go:240] Waiting for caches to sync for client-ca::kube-system::extension-apiserver-authentication::client-ca-file
I0428 02:36:28.864738 1 secure_serving.go:197] Serving securely on [::]:4443
I0428 02:36:28.865116 1 tlsconfig.go:240] Starting DynamicServingCertificateController
I0428 02:36:28.865135 1 dynamic_serving_content.go:130] Starting serving-cert::/tmp/apiserver.crt::/tmp/apiserver.key
I0428 02:36:28.964294 1 shared_informer.go:247] Caches are synced for client-ca::kube-system::extension-apiserver-authentication::requestheader-client-ca-file
I0428 02:36:28.964331 1 shared_informer.go:247] Caches are synced for RequestHeaderAuthRequestController
I0428 02:36:28.964374 1 shared_informer.go:247] Caches are synced for client-ca::kube-system::extension-apiserver-authentication::client-ca-file
E0428 02:36:29.110079 1 server.go:132] unable to fully scrape metrics: [unable to fully scrape metrics from node k8s-node2: unable to fetch metrics from node k8s-node2: Get "https://42.51.80.225:10250/stats/summary?only_cpu_and_memory=true": x509: cannot validate certificate for 42.51.80.225 because it doesn't contain any IP SANs, unable to fully scrape metrics from node k8s-master1: unable to fetch metrics from node k8s-master1: Get "https://42.51.80.221:10250/stats/summary?only_cpu_and_memory=true": x509: cannot validate certificate for 42.51.80.221 because it doesn't contain any IP SANs, unable to fully scrape metrics from node k8s-master3: unable to fetch metrics from node k8s-master3: Get "https://42.51.80.223:10250/stats/summary?only_cpu_and_memory=true": x509: cannot validate certificate for 42.51.80.223 because it doesn't contain any IP SANs, unable to fully scrape metrics from node k8s-node1: unable to fetch metrics from node k8s-node1: Get "https://42.51.80.224:10250/stats/summary?only_cpu_and_memory=true": x509: cannot validate certificate for 42.51.80.224 because it doesn't contain any IP SANs, unable to fully scrape metrics from node k8s-node3: unable to fetch metrics from node k8s-node3: Get "https://42.51.80.226:10250/stats/summary?only_cpu_and_memory=true": x509: cannot validate certificate for 42.51.80.226 because it doesn't contain any IP SANs, unable to fully scrape metrics from node k8s-master2: unable to fetch metrics from node k8s-master2: Get "https://42.51.80.222:10250/stats/summary?only_cpu_and_memory=true": x509: cannot validate certificate for 42.51.80.222 because it doesn't contain any IP SANs]
E0428 02:37:29.085847 1 server.go:132] unable to fully scrape metrics: [unable to fully scrape metrics from node k8s-node1: unable to fetch metrics from node k8s-node1: Get "https://42.51.80.224:10250/stats/summary?only_cpu_and_memory=true": x509: cannot validate certificate for 42.51.80.224 because it doesn't contain any IP SANs, unable to fully scrape metrics from node k8s-node2: unable to fetch metrics from node k8s-node2: Get "https://42.51.80.225:10250/stats/summary?only_cpu_and_memory=true": x509: cannot validate certificate for 42.51.80.225 because it doesn't contain any IP SANs, unable to fully scrape metrics from node k8s-node3: unable to fetch metrics from node k8s-node3: Get "https://42.51.80.226:10250/stats/summary?only_cpu_and_memory=true": x509: cannot validate certificate for 42.51.80.226 because it doesn't contain any IP SANs, unable to fully scrape metrics from node k8s-master1: unable to fetch metrics from node k8s-master1: Get "https://42.51.80.221:10250/stats/summary?only_cpu_and_memory=true": x509: cannot validate certificate for 42.51.80.221 because it doesn't contain any IP SANs, unable to fully scrape metrics from node k8s-master3: unable to fetch metrics from node k8s-master3: Get "https://42.51.80.223:10250/stats/summary?only_cpu_and_memory=true": x509: cannot validate certificate for 42.51.80.223 because it doesn't contain any IP SANs, unable to fully scrape metrics from node k8s-master2: unable to fetch metrics from node k8s-master2: Get "https://42.51.80.222:10250/stats/summary?only_cpu_and_memory=true": x509: cannot validate certificate for 42.51.80.222 because it doesn't contain any IP SANs]