gpt4 book ai didi

elasticsearch - Helm chart 稳定/logstash-在同一ns中看不到elasticsearch

转载 作者:行者123 更新时间:2023-12-02 11:46:43 27 4
gpt4 key购买 nike

我已经安装了本地测试elasticsearch和logstash,它们似乎看不到本地es-知道在集群/ ns中如何看到es吗?

helm repo add elastic https://helm.elastic.co
helm install elastic/elasticsearch --name elasticsearch
helm repo add stable https://kubernetes-charts.storage.googleapis.com/
helm install stable/logstash --name logstash -f logstash.yaml

这是错误消息:
[2020-01-29T07:40:43,368][WARN ][logstash.outputs.elasticsearch] Attempted to resurrect connection to dead ES instance, but got an error. {:url=>"http://elasticsearch.cluster.local:9200/", :error_type=>LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError, :error=>"Elasticsearch Unreachable: [http://elasticsearch.cluster.local:9200/][Manticore::ResolutionFailure] elasticsearch.cluster.local: Name or service not known"}

logstash.yaml是-(可以使用 helm inspect values stable/logstash检查完整的配置),我整理了所有内容,并保留了我认为重要的内容。
elasticsearch:
host: elasticsearch.cluster.local
port: 9200

编辑:
当我将elasticsearch master的Pod的IP放入时,一切都正常了-问题是有3个Pod,我宁愿点击它的dns / fqdn而不是特定的实例-知道它在群集中的可见性了吗?

最佳答案

好的,所以我了解了DNS的工作方式

首先找出服务名称:

$ kubectl get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
elasticsearch-master ClusterIP 10.140.10.26 <none> 9200/TCP,9300/TCP 108m
elasticsearch-master-headless ClusterIP None <none> 9200/TCP,9300/TCP 108m
kibana-kibana ClusterIP 10.140.10.55 <none> 5601/TCP 108m

看看它是什么 namespace
$ kubectl get ns
NAME STATUS AGE
default Active 1d
kube-public Active 1d
kube-system Active 1d
monitoring Active 1d

并可以通过
elasticsearch-master.monitoring.svc.cluster.local

关于elasticsearch - Helm chart 稳定/logstash-在同一ns中看不到elasticsearch,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59962582/

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