Verify Nginx Ingress Controller Hostname

To create a record in the Route53 nameserver, verify the Nginx Ingress Controller’s hostname.

kubectl get svc \
      -n ingress-nginx \
      ingress-nginx-controller \
      -o jsonpath='{.status.loadBalancer.ingress[0].hostname}' \
  | xargs -I{} echo "{}"
# Nginx Ingress Controller Hostname
XXX.elb.ap-northeast-2.amazonaws.com

Create Route53 Record

Navigate to Route53 > Hosted Zones > Target Domain Page and click Create record.

On the record creation page, enter the following values and click Create record.

  • Record Name: *
  • Record Type: CNAME
  • Value: Nginx Ingress Controller Hostname

Run the following command to verify that the record has been successfully applied to the nameserver.

dig "<Domain registered as a record>"
; <<>> DiG 9.10.6 <<>> *.ale-dev.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28445
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 4, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;*.ale-dev.com.                 IN      A

;; ANSWER SECTION:
*.ale-dev.com.          300     IN      CNAME   XXX.elb.ap-northeast-2.amazonaws.com.
XXX.elb.ap-northeast-2.amazonaws.com. 60 IN A XXX.XXX.XXX.XXX
XXX.elb.ap-northeast-2.amazonaws.com. 60 IN A XXX.XXX.XXX.XXX

;; AUTHORITY SECTION:
elb.ap-northeast-2.amazonaws.com. 59908 IN NS   ns-1990.awsdns-56.co.uk.
elb.ap-northeast-2.amazonaws.com. 59908 IN NS   ns-42.awsdns-05.com.
elb.ap-northeast-2.amazonaws.com. 59908 IN NS   ns-679.awsdns-20.net.
elb.ap-northeast-2.amazonaws.com. 59908 IN NS   ns-1346.awsdns-40.org.

;; Query time: 22 msec
;; SERVER: 1.214.68.2#53(1.214.68.2)
;; WHEN: Thu Sep 05 17:48:38 KST 2024
;; MSG SIZE  rcvd: 303