I am running a bunch of services inside a AWS EKS cluster. Using below service as an example.
$ k get svc redis -n production
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
redis ClusterIP 10.100.215.197 <none> 6379/TCP 2y73d
When I use dig
to find out the reverse dns record, it shows below:
root@server-684c765d78-6z4wv:/app# dig -x 10.100.215.197
; <<>> DiG 9.16.37-Debian <<>> -x 10.100.215.197
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15985
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 784136d1092b3acc (echoed)
;; QUESTION SECTION:
;197.215.100.10.in-addr.arpa. IN PTR
;; ANSWER SECTION:
197.215.100.10.in-addr.arpa. 5 IN PTR redis.production.svc.cluster.local.
;; Query time: 0 msec
;; SERVER: 10.100.0.10#53(10.100.0.10)
;; WHEN: Sun Feb 05 05:04:40 UTC 2023
;; MSG SIZE rcvd: 143
However, if I add a record type parameter any
, it shows
root@server-684c765d78-6z4wv:/app# dig -x 10.100.215.197 any
; <<>> DiG 9.16.37-Debian <<>> -x 10.100.215.197 any
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 10130
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;197.215.100.10.in-addr.arpa. IN ANY
;; ANSWER SECTION:
197.215.100.10.in-addr.arpa. 30 IN PTR ip-10-100-215-197.us-east-2.compute.internal.
;; Query time: 4 msec
;; SERVER: 10.100.0.10#53(10.100.0.10)
;; WHEN: Sun Feb 05 05:04:42 UTC 2023
;; MSG SIZE rcvd: 141
My question is why it shows two different results redis.production.svc.cluster.local.
and ip-10-100-215-197.us-east-2.compute.internal.
? and what are their relation?