我已经通过云控制台UI与Istio创建了一个私有GKE集群。该集群使用VPC对等设置,以便能够到达另一个Google Cloud Project中的另一个私有GKE集群。
我已经使用Kubernetes中的服务在staging命名空间中创建了一个部署(名为website)。我的目标是使用特使代理,通过Istio向外部世界公开此服务。我已经创建了必要的VirtualService和Gateway,遵循this guide。
运行"kubectl exec ...“要访问私有集群中的pod,我可以成功连接到website服务的内部IP地址,并使用"curl“查看该服务的输出。
我已经设置了NAT网关,私有集群中的pods可以连接到Internet。我通过curl-ing website pod中的各种非Google网页证实了这一点。
但是,正如上面的指南所提到的,我不能使用website服务的External IP从外部连接到istio-ingressgateway服务。相反,curl-ing External IP会导致超时。
我将所有相关资源的完整YAML配置放在一个私有的Gist中,如下所示:https://gist.github.com/marceldegraaf/0f36ca817a8dba45ac97bf6b310ca282
我想知道我在这里的配置中是否遗漏了什么,或者我的用例实际上是不可能的?
发布于 2019-02-20 19:52:55
看看你的要点,我怀疑问题出在Gateway和istio-ingressgateway的连接上。
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: website-gateway
namespace: staging
labels:
version: v1
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "*"特别是,我不相信selector部分是正确的。
您应该能够执行以下操作
kubectl describe po -n istio-system istio-ingressgateway-rrrrrr-pppp
找出选择器在Istio Ingress pod中尝试匹配的内容。
发布于 2020-09-27 04:10:50
我也有同样的问题。在我的例子中,istio虚拟服务找不到我的服务。
在你的VirtualService上试试这个:
route:
- destination:
host: website
port:
number: 80https://stackoverflow.com/questions/54784419
复制相似问题