简体   繁体   English

无法使用Istio Sidecar卷曲pod上的elasticsearch

[英]Can't curl elasticsearch from pod with Istio sidecar

I have Istio installed in my cluster, and the sidecar on one of my pods in namespace proto. 我在群集中安装了Istio,并在命名空间原型中的其中一个Pod中安装了sidecar。 Then i have elasticsearch installed in another namespace, which dosent have the sidecar. 然后我将Elasticsearch安装在另一个命名空间中,该命名空间具有辅助功能。 The problem is that i can't curl elasticsearch from inside my pods in proto namespace, but i can do it from exactly the same pod, but in another namespace without the sidecar on it. 问题是我无法从proto名称空间的pod内卷曲elasticsearch,但是我可以从完全相同的pod做到这一点,但可以在另一个没有sidecar的名称空间中进行。

This is the error: 这是错误:

/app # curl -k https://elasticsearch-elasticsearch-cluster.logging.svc.cluster.local:9200 curl: (35) Unknown SSL protocol error in connection to elasticsearch-elasticsearch-cluster.logging.svc.cluster.local:9200 / app#curl -k https://elasticsearch-elasticsearch-cluster.logging.svc.cluster.local:9200 curl:(35)与elasticsearch-elasticsearch-cluster.logging.svc.cluster.local有关的未知SSL协议错误:9200

Anybody know what could be the problem here ? 有人知道这可能是什么问题吗?

Try to give the port 9200 in the spec of the service some name starting with tcp , like tcp-elastic-search-port or, also, specify the protocol's port as TCP . 尝试给服务规范中的端口9200赋予一个以tcp开头的名称,例如tcp-elastic-search-port或者也将协议的端口指定为TCP It will instruct Istio to treat the traffic to that port as tcp. 它将指示Istio将到该端口的流量视为tcp。

The issue is probably related to the Istio port handling, protocol-wise - see https://istio.io/docs/setup/kubernetes/sidecar-injection.html#pod-spec-requirements . 该问题可能与协议方面的Istio端口处理有关-请参阅https://istio.io/docs/setup/kubernetes/sidecar-injection.html#pod-spec-requirements

Okay, so i fixed the problem. 好吧,所以我解决了这个问题。 After different kinds of installations, and on new clean clusters as well, i got it working by install the helm chart from istio master branch, and activate automatic sidecar injection in the values.yaml file. 在进行了各种安装之后,以及在新的干净集群上,我通过安装来自istio master分支的helm图表使其工作,并在values.yaml文件中激活了自动边车注入。

The helm chart from latest istio version 0.7.1 is not working, and manual sidecar injection is not working either, so i needed to use the automatic, by activating it in the helm chart. 最新的istio版本0.7.1的头盔图表不起作用,手动侧车注入也不起作用,因此我需要通过在头盔图表中激活它来使用自动变速器。

I'am not sure why it didn't work before, i can curl my elasticsearch from another namespace without sidecar now, and egress rules works as expected. 我不确定为什么以前不起作用,我现在可以在没有sidecar的情况下从另一个名称空间卷曲我的elasticsearch,并且出口规则可以按预期工作。

Thanks, for the help anyway :) 谢谢,反正为您提供帮助:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM