我试图让Kubernetes上的Istio设置为入口控制器 . 问题是我的两个应用程序似乎可以从Istio ingress控制器节点端口(例如,http://[host]:31380/application1和http://[host]:31380/application2)访问,但无法从443/80访问 .
我是Kubernetes和Istio的新手,所以我使用https://istio.io/docs/guides/bookinfo/指南作为参考 . 在指南之后相当容易,我能够使用所提到的节点端口访问Bookinfo应用程序 . 我无法从443/80访问它 . 我用舵图安装了Istio . 我也没有在Kubernetes仪表板中看到Ingresses下的任何内容 .
以下是网关/虚拟服务yaml的示例:
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: myapp-gateway
spec:
selector:
istio: ingressgateway # use istio default controller
servers:
- port:
number: 80
name: http
protocol: HTTP
hosts:
- "*"
---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: myapp-virtual-service
spec:
hosts:
- "*"
gateways:
- myapp-gateway
http:
- match:
- uri:
prefix: /myapp
route:
- destination:
host: myapp-app-service
port:
number: 7080
- match:
- uri:
prefix: /
route:
- destination:
host: kibana
port:
number: 5601
关于我要做什么才能让它在443上听的任何想法?我完全错过了一个组件吗?
1 回答
如果需要在443/80上运行到您的应用程序的路由,则您的Kubernetes群集必须部署外部负载均衡器 . 如果不存在,则流量将路由到入口节点端口 .
请参阅 - https://istio.io/docs/tasks/traffic-management/ingress/#determining-the-ingress-ip-and-ports(确定入口IP和端口):
"If the EXTERNAL-IP value is set, your environment has an external load balancer that you can use for the ingress gateway. If the EXTERNAL-IP value is (or perpetually ), your environment does not provide an external load balancer for the ingress gateway. In this case, you can access the gateway using the service’s node port."
没有外部负载均衡器的裸机实例示例:
如果要部署到在线 Cloud 提供程序(例如IBM Bluemix(可能是AWS / Azure /等)),则应该已经配置了一个 . 如果您的配置是裸机配置,则可能没有配置负载均衡器 .
我的带有外部负载均衡器的Bluemix实例的示例:
我还没有回去将负载均衡器部署到裸机,所以想听听是否有人 . 我简要地看了一下Metal,但没花太多时间 .