You can route the traffic for the domain to pods of a service and add TLS termination on the AWS Load Balancer.
-
You have an access to the OpenShift CLI (
oc
).
-
Create a YAML file that defines the
AWSLoadBalancerController
resource:Exampleadd-tls-termination-albc.yaml
fileapiVersion: networking.olm.openshift.io/v1 kind: AWSLoadBalancerController metadata: name: cluster spec: subnetTagging: Auto ingressClass: tls-termination (1)
-
Defines the ingress class name. If the ingress class is not present in your cluster the AWS Load Balancer Controller creates one. The AWS Load Balancer Controller reconciles the additional ingress class values if
spec.controller
is set toingress.k8s.aws/alb
.
-
-
Create a YAML file that defines the
Ingress
resource:Exampleadd-tls-termination-ingress.yaml
fileapiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: <example> (1) annotations: alb.ingress.kubernetes.io/scheme: internet-facing (2) alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:us-west-2:xxxxx (3) spec: ingressClassName: tls-termination (4) rules: - host: <example.com> (5) http: paths: - path: / pathType: Exact backend: service: name: <example-service> (6) port: number: 80
-
Specifies the ingress name.
-
The controller provisions the load balancer for ingress in a public subnet to access the load balancer over the internet.
-
The Amazon Resource Name (ARN) of the certificate that you attach to the load balancer.
-
Defines the ingress class name.
-
Defines the domain for traffic routing.
-
Defines the service for traffic routing.
-