gpt4 book ai didi

elasticsearch - metricbeat kubernetes DNS 查找失败 : no such host

转载 作者:IT王子 更新时间:2023-10-29 02:10:12 28 4
gpt4 key购买 nike

我尝试按照此处 ( https://www.elastic.co/guide/en/beats/metricbeat/current/running-on-kubernetes.html ) 在 GCP kubernetes 集群上运行官方 metricbeat docker 镜像作为 deamonset 并更改设置,以便它应该将流量路由到现有的 Elasticsearch pod,但我不断收到错误消息:

2018-02-22T14:04:54.515Z    WARN    transport/tcp.go:36 DNS lookup failure "elasticsearch-logging.kube-system.svc.cluster.local": lookup elasticsearch-logging.kube-system.svc.cluster.local: no such host
2018-02-22T14:04:55.516Z ERROR pipeline/output.go:74 Failed to connect: Get http://elasticsearch-logging.kube-system.svc.cluster.local:9200: lookup elasticsearch-logging.kube-system.svc.cluster.local: no such host
2018-02-22T14:04:55.517Z WARN transport/tcp.go:36 DNS lookup failure "elasticsearch-logging.kube-system.svc.cluster.local": lookup elasticsearch-logging.kube-system.svc.cluster.local: no such host
2018-02-22T14:04:57.517Z ERROR pipeline/output.go:74 Failed to connect: Get http://elasticsearch-logging.kube-system.svc.cluster.local:9200: lookup elasticsearch-logging.kube-system.svc.cluster.local: no such host
2018-02-22T14:04:57.519Z WARN transport/tcp.go:36 DNS lookup failure "elasticsearch-logging.kube-system.svc.cluster.local": lookup elasticsearch-logging.kube-system.svc.cluster.local: no such host
2018-02-22T14:05:01.519Z ERROR pipeline/output.go:74 Failed to connect: Get http://elasticsearch-logging.kube-system.svc.cluster.local:9200: lookup elasticsearch-logging.kube-system.svc.cluster.local: no such host
2018-02-22T14:05:01.532Z WARN transport/tcp.go:36 DNS lookup failure "elasticsearch-logging.kube-system.svc.cluster.local": lookup elasticsearch-logging.kube-system.svc.cluster.local: no such host

主机名没有问题,因为其他 pod 正在成功将数据推送到 elastic。现在,经过一些研究,这证明是 Golang DNS 解析器(而不是 metricbeat 本身)的问题。 还有其他人遇到过这个问题吗?任何解决方案?

最佳答案

我们有同样的问题,解决它的方法是添加这个

hostNetwork: true  
dnsPolicy: ClusterFirstWithHostNet

在与容器标签相同级别的 DaemonSet yaml 中

关于elasticsearch - metricbeat kubernetes DNS 查找失败 : no such host,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48929554/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com