Handling "www.domain.com" on AWS?

10 views
Skip to first unread message

nicholas...@gmail.com

unread,
May 2, 2019, 12:36:30 AM5/2/19
to kubernetes-sig-aws
Hello, 

I have my ALB set to domain.com with the following rules:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: redacted
namespace: default
annotations:
alb.ingress.kubernetes.io/listen-ports: '[{"HTTP": 80}, {"HTTPS":443}]'
alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig": { "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_301"}}'
spec:
rules:
- host: domain.com
http:
paths:
- path: /*
backend:
serviceName: ssl-redirect
servicePort: use-annotation
- path: /*
backend:
serviceName: redacted
servicePort: 80

I'd like to either serve up www.domain.com or redirect from www.domain.com to domain.com. I am using a Route53 A record which points to be ALB.

My questions are as follows:

1. Do I need to specify a new "host" entry in my yaml above to handle this?
2. What is recommended in Route53 for this? A or CNAME record? Use an Alias pointing to my ALB or just "Value" and if so, what specifically?

Thanks in advance.

Reply all
Reply to author
Forward
0 new messages