1.通过官网的by step 使用ingress-gateway发布ssl始终不成功,但是ingress-gateway的http服务暴露ok。
2.决定使用曲线救援方法,在外侧通过nginx来发布tls,内部回源使用http,但是遇见了http 426的错误。
➜ ~ curl https://192.168.1.25:443/ -H "Host: uat.sklinux.com" -i -k -v
* Trying 192.168.1.25...
* TCP_NODELAY set
* Connected to 192.168.1.25 (192.168.1.25) port 443 (#0)
* WARNING: disabling hostname validation also disables SNI.
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate: *.uat.sklinux.com
* Server certificate: Fishdrowned ROOT CA
> GET / HTTP/1.1
> Host: uat.sklinux.com
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 426 Upgrade Required
HTTP/1.1 426 Upgrade Required
< Server: nginx
Server: nginx
< Date: Mon, 27 May 2019 02:25:25 GMT
Date: Mon, 27 May 2019 02:25:25 GMT
< Content-Length: 0
Content-Length: 0
< Connection: keep-alive
Connection: keep-alive
经查原因为:
nginx 反向代理默认走的http 1.0版本
但是 被反向代理的服务器是1.1版本的!
所以在反向代理的时候加上一句:
proxy_http_version 1.1;
即可!
但是最终通过SDS进行tls服务发布还没彻底解决,这个问题将持续跟进社区。