Using discovery services consul on kubernetes

Hi there ,

i just following step how to using consul dns on kubernetes , edited configmaps on coredns but still cant get reply on it → dig consul.service.consul

 dig consul.service.consul

; <<>> DiG 9.11.2-P1 <<>> consul.service.consul
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 27098
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: d0e695808af43257 (echoed)
;; QUESTION SECTION:
;consul.service.consul.		IN	A

;; AUTHORITY SECTION:
.			30	IN	SOA	a.root-servers.net. nstld.verisign-grs.com. 2022011900 1800 900 604800 86400

;; Query time: 11 msec
;; SERVER: 169.254.25.10#53(169.254.25.10)
;; WHEN: Wed Jan 19 06:21:16 UTC 2022
;; MSG SIZE  rcvd: 137

/ # dig consul.service.consul

; <<>> DiG 9.11.2-P1 <<>> consul.service.consul
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 27061
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: e614084d74526e1a (echoed)
;; QUESTION SECTION:
;consul.service.consul.		IN	A```

my config ,

{
	"Corefile": ".:53 {
		    errors
		    health {
		      lameduck 5s
		    } 
		    ready     
		    kubernetes cluster.local in-addr.arpa ip6.arpa {
		        pods insecure
		        fallthrough in-addr.arpa ip6.arpa
		    }
		    prometheus :9153
		    forward . /etc/resolv.conf
		    cache 30
		    loop
		    reload
		    loadbalance
		}
		consul {
		  errors
		  cache 30
		  forward . 10.233.27.14
		}
		"
}```

is there any config that i should double check, really appreaciate ur help

Thx,
Lookman```

Hey @lookman.af

It’s hard to tell from your config. What is the IP that you’re using in your Corefile config? Maybe double check that.

hi @ishustava1

That ip i got from here’s

kubectl get svc -n kong consul-dns --output jsonpath='{.spec.clusterIP}'
10.233.27.14```