指标:无法访问的 Kubernetes API(无日志)

指标:无法访问的 Kubernetes API(无日志)

运行 rke 设置时我们遇到这个问题:

reconcile] host [192.168.137.41] is a control plane node without reachable Kubernetes API endpoint in the cluster

在指标窗格中:

│ E0415 14:51:31.215141       1 scraper.go:140] "Failed to scrape node" err="Get \"https://192.168.137.42:10250/metrics/resource\": dial tcp 192.168.137.42:10250: connect: no route to host" node="master2"                                                       │
│ E0415 14:51:33.263196       1 scraper.go:140] "Failed to scrape node" err="Get \"https://192.168.137.63:10250/metrics/resource\": dial tcp 192.168.137.63:10250: connect: no route to host" node="worker3"                                                       │
│ E0415 14:51:33.263195       1 scraper.go:140] "Failed to scrape node" err="Get \"https://192.168.137.65:10250/metrics/resource\": dial tcp 192.168.137.65:10250: connect: no route to host" node="worker5"                                                       │
│ E0415 14:51:37.295226       1 scraper.go:140] "Failed to scrape node" err="Get \"https://192.168.137.41:10250/metrics/resource\": dial tcp 192.168.137.41:10250: connect: no route to host" node="master1"                                                       │
│ E0415 14:51:37.295302       1 scraper.go:140] "Failed to scrape node" err="Get \"https://192.168.137.64:10250/metrics/resource\": dial tcp 192.168.137.64:10250: connect: no route to host" node="worker4"                                                       │
│ E0415 14:51:37.359145       1 scraper.go:140] "Failed to scrape node" err="Get \"https://192.168.137.43:10250/metrics/resource\": dial tcp 192.168.137.43:10250: connect: no route to host" node="master3"                                                       │
│ E0415 14:51:37.359151       1 scraper.go:140] "Failed to scrape node" err="Get \"https://192.168.137.61:10250/metrics/resource\": dial tcp 192.168.137.61:10250: connect: no route to host" node="worker1"                                                       │
│ E0415 14:51:46.191171       1 scraper.go:140] "Failed to scrape node" err="Get \"https://192.168.137.43:10250/metrics/resource\": dial tcp 192.168.137.43:10250: connect: no route to host" node="master3"                                                       │
│ E0415 14:51:48.239178       1 scraper.go:140] "Failed to scrape node" err="Get \"https://192.168.137.63:10250/metrics/resource\": dial tcp 192.168.137.63:10250: connect: no route to host" node="worker3"                                                       │
│ E0415 14:51:48.239298       1 scraper.go:140] "Failed to scrape node" err="Get \"https://192.168.137.42:10250/metrics/resource\": dial tcp 192.168.137.42:10250: connect: no route to host" node="master2"                                                       │
│ E0415 14:51:52.335177       1 scraper.go:140] "Failed to scrape node" err="Get \"https://192.168.137.64:10250/metrics/resource\": dial tcp 192.168.137.64:10250: connect: no route to host" node="worker4"                                                       │

答案1

我们找到了问题所在;是防火墙阻止了端口上的流量。另外,我尊重文档,但也许文档需要更新?目前,我只会禁用防火墙。

相关内容