使用 http 设置 Istio 网关很好。
但是我无法设置https。我按照指南https://istio.io/docs/tasks/traffic-management/secure-ingress/
Istio:1.0.2(使用 Helm 安装)Kubernetes 1.10.3 eks
我正在使用 COMODO 的证书。
只有第一次,我才能使用 https 访问该页面。访问页面后,如果我再次尝试连接,我会在浏览器中收到以下错误。
mycompany.com unexpectedly closed the connection.
Try:
Checking the connection
Checking the proxy and the firewall
Run Code Online (Sandbox Code Playgroud)
如果我使用 curl,我会收到以下错误。
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to qa-web.ffau.to:443
Run Code Online (Sandbox Code Playgroud)
如果我正在使用 openssl 进行测试,
openssl s_client -tls1 -connect mycompany.com:443 -msg
错误
140735917949896:error:1409E0E5:SSL routines:SSL3_WRITE_BYTES:ssl handshake failure:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.50.2/libressl/ssl/s3_pkt.c:522:
Run Code Online (Sandbox Code Playgroud)
这就是我创造秘密的方式。
kubectl create -n istio-system secret tls istio-ingressgateway-certs --key ffau.to.key --cert ffau.to.crt
Run Code Online (Sandbox Code Playgroud)
这是网关和虚拟服务的yaml。
apiVersion: networking.istio.io/v1alpha3
kind: Gateway
metadata:
name: mycompany-gateway
spec:
selector: …Run Code Online (Sandbox Code Playgroud)