Curl Istio特使正在删除带有主机头的请求

Curl Istio特使正在删除带有主机头的请求,curl,kubernetes,virtualhost,envoyproxy,Curl,Kubernetes,Virtualhost,Envoyproxy,我在尝试让Istio在集群上工作时遇到问题。我的基础结构如下所示: 我有一个Magento商店,前面有一层清漆。在安装istio之前,它正在工作。我已经开始注射了。Varnish部署在一个pod中,并有自己的服务重定向到magento服务 当我尝试从清漆卷曲到magento时,问题就出现了 如果我从varnish中卷曲magento服务,我会重定向到magento URL(这是预期的行为) 你知道为什么会这样吗?为什么主机头返回404而不请求magento服务 我还想提到的是,magento在没

我在尝试让Istio在集群上工作时遇到问题。我的基础结构如下所示:

我有一个Magento商店,前面有一层清漆。在安装istio之前,它正在工作。我已经开始注射了。Varnish部署在一个pod中,并有自己的服务重定向到magento服务

当我尝试从清漆卷曲到magento时,问题就出现了

如果我从varnish中卷曲magento服务,我会重定向到magento URL(这是预期的行为)

你知道为什么会这样吗?为什么主机头返回404而不请求magento服务


我还想提到的是,magento在没有varnish的情况下工作,它能够连接到redis(在同一集群中)和mysql(在集群外),因此我放弃了magento的麻烦。

我遇到了一个类似的问题,主机头是一个与内部服务条目名称不匹配的外部域(它永远不会)。由于它与404不匹配,我想一定有办法用VirtualService配置它,但还不确定如何配置。

你能提供Istio对象配置吗?我也有类似的问题。我有两个吊舱,每个都在k8s服务后面。我还为每个服务定义了一个
virtualservice
。每当我
将其执行到服务A中并尝试
卷曲服务B时,我得到
404nR
。妙语:当我尝试使用浏览器中的URL栏从SeriveB获取资源时,我得到了
200
root@varnish-6468d5958d-dvxhx:/# curl -v store-es    
* Rebuilt URL to: store-es/
*   Trying 10.32.97.229...
* TCP_NODELAY set
* Connected to store-es (10.32.97.229) port 80 (#0)
> GET / HTTP/1.1
> Host: store-es
> User-Agent: curl/7.52.1
> Accept: */*
> 
< HTTP/1.1 301 Moved Permanently
< server: envoy
< date: Wed, 07 Nov 2018 11:08:47 GMT
< content-type: text/html
< content-length: 185
< location: https://store-sta.xxxxx.yyy/
< myheader: store-es-6484d46d66-952xj
< x-envoy-upstream-service-time: 4
< 
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.13.8</center>
</body>
</html>
* Curl_http_done: called premature == 0
* Connection #0 to host store-es left intact
root@varnish-6468d5958d-dvxhx:/# curl -v -H "Host: store-sta.xxxxx.yyy" store-es    
* Rebuilt URL to: store-es/
*   Trying 10.32.97.229...
* TCP_NODELAY set
* Connected to store-es (10.32.97.229) port 80 (#0)
> GET / HTTP/1.1
> Host: store-sta.xxxxx.yyy
> User-Agent: curl/7.52.1
> Accept: */*
> 
< HTTP/1.1 404 Not Found
< date: Wed, 07 Nov 2018 11:11:59 GMT
< server: envoy
< content-length: 0
< 
* Curl_http_done: called premature == 0
* Connection #0 to host store-es left intact
[2018-11-07T11:11:50.548Z] "GET /HTTP/1.1" 404 NR 0 0 0 - "-" "curl/7.52.1" "e754b17f-ae2e-4734-beb4-f7a2d6e412da" "store-sta.xxxxx.yyy" "-" - - 10.32.97.229:80 10.32.67.5:45540