gpt4 book ai didi

nginx - 对基础服务使用Nginx入口SSL channel 时缺少主机名(SNI)

转载 作者:行者123 更新时间:2023-12-02 12:11:29 25 4
gpt4 key购买 nike

我正在尝试使用nginx-ingress-controller实现SSL Passtrough。这是我的入口对象:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/backend-protocol: HTTPS
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
labels:
my-label: example
name: example
namespace: example
spec:
rules:
- host: '*.example.com'
http:
paths:
- backend:
serviceName: example
servicePort: 8443
path: /
--enable-ssl-passtrough标志存在于 Controller args中。
当请求通过入口 Controller 到达我的基础服务时,我正在尝试解析SNI,以找出用于查询我应该出示的证书的域,但是该服务找不到SNI并返回此错误:
{"level":"debug","ts":1592992137.1836417,"msg":"Error getting server name","error":"No hostname"}
nginx-ingress-controller在解析时会删除SNI吗?或这种行为的原因可能是什么?
预先感谢您的帮助

最佳答案

我直接与nginx-ingress开发人员联系,并得到了信息,表明该方法不起作用的原因是通配符域,nginx-ingress不支持该域。
其他所有内容均已正确配置,并且在将*.example.com更改为特定内容(例如whatever.example.com)时,它可以正常工作。

关于nginx - 对基础服务使用Nginx入口SSL channel 时缺少主机名(SNI),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62552997/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com