helm chart stable/logstash - 在同一个 ns 中没有看到 elasticsearch
helm chart stable/logstash - doesnt see elasticsearch in same ns
我已经安装了用于本地测试的 elasticsearch 和 logstash,它们似乎看不到本地 es - 知道在 cluster/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 pods 我宁愿点击它的 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
查看它是什么命名空间
$ kubectl get ns
NAME STATUS AGE
default Active 1d
kube-public Active 1d
kube-system Active 1d
monitoring Active 1d
并且其他 pods 通过
可以看到
elasticsearch-master.monitoring.svc.cluster.local
我已经安装了用于本地测试的 elasticsearch 和 logstash,它们似乎看不到本地 es - 知道在 cluster/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 pods 我宁愿点击它的 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
查看它是什么命名空间
$ kubectl get ns
NAME STATUS AGE
default Active 1d
kube-public Active 1d
kube-system Active 1d
monitoring Active 1d
并且其他 pods 通过
可以看到elasticsearch-master.monitoring.svc.cluster.local