【发布时间】:2020-06-28 22:13:30
【问题描述】:
我正在尝试在 Apache Openwhisk 部署中为我的 EKS 负载均衡器设置 SSL 终止
kind: Service
metadata:
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: 50m
service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
service.beta.kubernetes.io/aws-load-balancer-ssl-cert: <arn>
service.beta.kubernetes.io/aws-load-balancer-ssl-ports: https-api
creationTimestamp: "2020-03-17T19:06:28Z"
labels:
app: owdev-openwhisk
chart: openwhisk-0.2.1
heritage: Helm
name: owdev-nginx
release: owdev
name: owdev-nginx
namespace: openwhisk
resourceVersion: "43288"
selfLink: /api/v1/namespaces/openwhisk/services/owdev-nginx
uid: 679858cf-6882-11ea-8746-02f532cfa957
spec:
clusterIP: <ip>
externalTrafficPolicy: Cluster
ports:
- name: http
nodePort: 31858
port: 80
protocol: TCP
targetPort: 80
- name: https-api
nodePort: 32653
port: 443
protocol: TCP
targetPort: 443
selector:
name: owdev-nginx
sessionAffinity: None
type: LoadBalancer
服务在部署时如下所示。使用此配置,当我在浏览器中访问端点时,我得到:
400 Bad Request
The plain HTTP request was sent to HTTPS port
但在内部:
curl -k -v https://owdev-nginx
工作正常。
如果我然后将 https-api 的 targetPort 交换为 http,外部端点工作,但内部端点有类似的错误。
关于如何调整以使外部和内部(忽略证书)请求通过它的任何建议?
我很欣赏这类似于此处的常见陷阱部分:https://kubernetes-on-aws.readthedocs.io/en/latest/user-guide/tls-termination.html 有没有办法解决它?
【问题讨论】:
标签: kubernetes amazon-elb openwhisk