通过Kubernetes设置AWS SSL证书
问题:重新启动入口后,将删除SSL证书,您必须不断安装它们。搜索后,我发现您可以以某种方式在YAML配置文件中配置SSL证书。使用我无法实现所需结果的配置。
带有入口服务配置的YAML:
apiVersion: v1
kind: Service
metadata:
name: nginx-ingress
annotations:
nginx.ingress.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:...
nginx.ingress.kubernetes.io/aws-load-balancer-backend-protocol: TCP
nginx.ingress.kubernetes.io/aws-load-balancer-ssl-ports: "https"
spec:
type: LoadBalancer
selector:
name: nginx-ingress
ports:
- name: http
port: 80
targetPort: 80
nodePort: 31823
protocol: TCP
- name: https
port: 443
targetPort: 443
nodePort: 31822
protocol: TCP
这就是AWS中的工作设置。如何通过配置文件实现此结果?
Problem: after restarting ingress, ssl certificates are removed and you have to constantly install them back. After some searching, I found out that you can somehow configure ssl certificates in the yaml configuration file. Playing with the configs I did not manage to achieve the desired result.
yaml with ingress service configs:
apiVersion: v1
kind: Service
metadata:
name: nginx-ingress
annotations:
nginx.ingress.kubernetes.io/aws-load-balancer-ssl-cert: arn:aws:acm:...
nginx.ingress.kubernetes.io/aws-load-balancer-backend-protocol: TCP
nginx.ingress.kubernetes.io/aws-load-balancer-ssl-ports: "https"
spec:
type: LoadBalancer
selector:
name: nginx-ingress
ports:
- name: http
port: 80
targetPort: 80
nodePort: 31823
protocol: TCP
- name: https
port: 443
targetPort: 443
nodePort: 31822
protocol: TCP
This is what the working settings in aws look like. How can you achieve this result through the configuration file?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决方案是删除这条线
,并将HTTPS的目标端口值从443更改为80
The solution was to remove this line
And change the targetPort value of https from 443 to 80