Kubernetes 1.17 deployment metrics-server appears no metrics known for node

I deployed the metrics-server in a cluster built with kubeadm on the local virtual machine vmware.

ubelet k8s-node01 (k8s-node01): Get https://k8s-node01:10250/stats/summary?only_cpu_and_memory=true: dial tcp: lookup k8s-node01 on 10.32.0.10:53: no such host, unable to fully scrape metrics from source kubelet_summary:k8s-master: unable to fetch metrics from Kubelet k8s-master (k8s-master): Get https://k8s-master:10250/stats/summary?only_cpu_and_memory=true: dial tcp: lookup k8s-master on 10.32.0.10:53: no such host, unable to fully scrape metrics from source kubelet_summary:k8s-node02: unable to fetch metrics from Kubelet k8s-node02 (k8s-node02): Get https://k8s-node02:10250/stats/summary?only_cpu_and_memory=true: dial tcp: lookup k8s-node02 on 10.32.0.10:53: no such host]
E0309 13:51:03.487103       1 reststorage.go:135] unable to fetch node metrics for node "k8s-master": no metrics known for node
E0309 13:51:03.487648       1 reststorage.go:135] unable to fetch node metrics for node "k8s-node01": no metrics known for node
E0309 13:51:03.487759       1 reststorage.go:135] unable to fetch node metrics for node "k8s-node02": no metrics known for node
 

 

metrics-server-deployment.yaml after adding---kubelet-preferred-address-types = InternalIP parameter, but not adding---kubelet-insecure-tls parameter, x509 x509 x509 problem verification problem will appear

E0309 13:57:53.055401       1 manager.go:111] unable to fully collect metrics: [unable to fully scrape metrics from source kubelet_summary:k8s-master: unable to fetch metrics from Kubelet k8s-master (192.168.17.150): Get https://192.168.17.150:10250/stats/summary?only_cpu_and_memory=true: x509: cannot validate certificate for 192.168.17.150 because it doesn't contain any IP SANs, unable to fully scrape metrics from source kubelet_summary:k8s-node01: unable to fetch metrics from Kubelet k8s-node01 (192.168.17.151): Get https://192.168.17.151:10250/stats/summary?only_cpu_and_memory=true: x509: cannot validate certificate for 192.168.17.151 because it doesn't contain any IP SANs, unable to fully scrape metrics from source kubelet_summary:k8s-node02: unable to fetch metrics from Kubelet k8s-node02 (192.168.17.152): Get https://192.168.17.152:10250/stats/summary?only_cpu_and_memory=true: x509: cannot validate certificate for 192.168.17.152 because it doesn't contain any IP SANs]
 

After adding these two parameters, it can run normally

 

After executing the kubectl top nodes operation command, if there is only one node's resource usage, please consider whether you specified the correct --pod-network-cidr and --service-cidr parameters when kubedam init, calico seems to be as if Cannot conflict with the physical machine network.

The effective way is to   search in https://github.com/kubernetes-sigs/metrics-server/ official issue or pull

 

Published 24 original articles · praised 36 · 20,000+ views

Guess you like

Origin blog.csdn.net/tanjunchen/article/details/104762428