【发布时间】:2021-09-17 05:59:10
【问题描述】:
我正在尝试在 Openshift 上部署一个 Angular 应用程序,并将 Istio 作为服务网格。服务 yaml:
- apiVersion: v1
kind: Service
metadata:
labels:
app: angularapp
service: angularapp
version: v1
name: angularapp
spec:
ports:
- name: http
protocol: TCP
port: 8080
targetPort: 8080
selector:
name: angularapp
到目前为止,一切都适用于 http 连接。为了更改为 https 连接,我将 Red Hat Openshift Service Mesh operator 安装提供的 istio-ingressgateway 路由配置为使用 passthrough
spec:
host: istio-ingressgateway-istio-system.apps.xxx.xx.xxxxxxx.opentlc.com
tls:
insecureEdgeTerminationPolicy: None
termination: passthrough
以及 istio 的网关资源:
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: testnamespace-gateway
spec:
selector:
istio: ingressgateway # use istio default controller
servers:
- port:
number: 443
name: https
protocol: HTTPS
tls:
mode: SIMPLE
credentialName: "router-certs"
hosts:
- "*"
VirtualService 指向 Angular 应用程序的 8080 端口:
route:
- destination:
host: angularapp
port:
number: 8080
问题:TLS 配置有效,并且暴露的 istio 入口网关 URL 确实具有 https 连接。但是,API Gateway 在向上述 istio URL 发出请求时会发出此错误:
由于配置错误,执行失败:无法识别的 SSL 消息,明文连接?
奇怪的是它只发生了一半,另一半有效,即使在每次运行后清除浏览器缓存后也是如此。请注意,只有 istio 入口网关 URL 具有 https 连接,而作为独立服务的 Angular 应用程序只有 http。
很抱歉这个冗长的问题,希望在这里得到一些帮助。谢谢!
【问题讨论】:
标签: kubernetes openshift aws-api-gateway istio