19.5. 添加 TLS 终止
您可以在 AWS Load Balancer 上添加 TLS 终止。
19.5.1. 在 AWS Load Balancer 中添加 TLS 终止 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
您可以将域的流量路由到服务的 pod,并在 AWS 负载均衡器中添加 TLS 终止。
先决条件
-
您可以访问 OpenShift CLI(
oc)。
流程
安装 Operator 并创建
aws-load-balancer-controller资源的实例:apiVersion: networking.k8s.io/v1 kind: AWSLoadBalancerController group: networking.olm.openshift.io/v1alpha11 metadata: name: cluster spec: subnetTagging: Auto ingressClass: tls-termination2 创建
Ingress资源:apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: <example>1 annotations: alb.ingress.kubernetes.io/scheme: internet-facing2 alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-west-2:xxxxx3 spec: ingressClassName: tls-termination4 rules: - host: <example.com>5 http: paths: - path: / pathType: Exact backend: service: name: <example-service>6 port: number: 80