Welcome to the Linux Foundation Forum!

LAB 9.3 test.io issue

Options
joewangprc
joewangprc Posts: 1
edited October 2021 in LFS258 Class Forum

Exercise 9.3

Step 11 (c). I am getting below error. Not sure how the /A/IN add in

master:~$ kubectl -n kube-system get configmaps coredns -o yaml
apiVersion: v1
data:
Corefile: |
.:53 {
rewrite name regex (.*).test.io {1}.default.svc.cluster.local
errors
health {

root@ubuntu:/# dig nginx.test.io
;; ;; Question section mismatch: got nginx.default.svc.cluster.local/A/IN
;; ;; Question section mismatch: got nginx.default.svc.cluster.local/A/IN
;; ;; Question section mismatch: got nginx.default.svc.cluster.local/A/IN
; <<>> DiG 9.16.1-Ubuntu <<>> nginx.test.io
;; global options: +cmd
;; connection timed out; no servers could be reached

root@ubuntu:/# dig nginx.default.svc.cluster.local
; <<>> DiG 9.16.1-Ubuntu <<>> nginx.default.svc.cluster.local
;; global options: +cmd
;; Got answer:
;;# Please edit the object below. Lines beginning with a '#' will be ignored,
;; WARNING: .local is reserved for Multicast DNS
;; You are currently testing what happens when an mDNS query is leaked to DNS
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59586
;; 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: f4aab8283d3a9e86 (echoed)
;; QUESTION SECTION:
;nginx.default.svc.cluster.local. IN A
;; ANSWER SECTION:
nginx.default.svc.cluster.local. 30 IN A 10.97.230.239
;; Query time: 0 msec
;; SERVER: 10.96.0.10#53(10.96.0.10)
;; WHEN: Thu Oct 14 15:25:44 +08 2021
;; MSG SIZE rcvd: 119

Step 14. It's working fine.

master:~$ kubectl -n kube-system get configmaps coredns -o yaml
apiVersion: v1
data:
Corefile: |
.:53 {
rewrite stop {
name regex (.).test.io {1}.default.svc.cluster.local
answer name (.
).default.svc.cluster.local {1}.test.io
}
errors
health {

root@ubuntu:/# dig nginx.test.io.
; <<>> DiG 9.16.1-Ubuntu <<>> nginx.test.io.
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 26970
;; 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: e37b27f4be1a1867 (echoed)
;; QUESTION SECTION:
;nginx.test.io. IN A
;; ANSWER SECTION:
nginx.test.io. 30 IN A 10.97.230.239
;; Query time: 0 msec
;; SERVER: 10.96.0.10#53(10.96.0.10)
;; WHEN: Thu Oct 14 15:30:36 +08 2021
;; MSG SIZE rcvd: 83
root@ubuntu:/#

Is there any hint on step 11?

Many Thanks.

Comments

  • chrispokorni
    chrispokorni Posts: 2,190
    Options

    Hi @joewangprc,

    It is difficult to determine if anything is out of its place in your YAML code and outputs without the "Code" formatting tags.

    When editing the Corefile content in the coredns ConfigMap some CLI tools may introduce unwanted invisible characters while pasting or when typing in new text. My recommendation is to revisit steps 8 and 12 to ensure the file only includes the desired config options after the edit.

    Regards,
    -Chris

  • ahailes
    Options

    Same here, works with the rewrite in step 14, doesn't work without

  • cguennoc
    Options

    I have same issue in lab 9.3 : test of step 11 failed and test of step 14 works.

    I found this following link "Breaking changes in ReWrite Plugin CoreDNS 1.8.4": https://github.com/coredns/coredns/issues/4834
    I worked with coredns 1.8.4.

    test of step 11 works well with coredns 1.8.3, 1.8.5 and 1.8.6.

  • bgarber
    Options

    I hit the same issue as you. The "dig" test returns:

    root@nettool:/# dig nginx.test.io
    ;; ;; Question section mismatch: got nginx.default.svc.cluster.local/A/IN
    ;; ;; Question section mismatch: got nginx.default.svc.cluster.local/A/IN
    ;; ;; Question section mismatch: got nginx.default.svc.cluster.local/A/IN

    ; <<>> DiG 9.16.1-Ubuntu <<>> nginx.test.io
    ;; global options: +cmd
    ;; connection timed out; no servers could be reached

  • serewicz
    serewicz Posts: 1,000
    Options

    Hello,

    Thank you to @cguennoc for testing other versions and posting that there was a breaking change done to version 1.8.4. It seems that coreDNS is back to proper function with 1.8.5.

    Regards,

  • zmicier0k
    Options

    @serewicz Please make a note somewhere in lab that it doesn't work in CoreDNS 1.8.4 for the future students it will save them time and nervous :)

Categories

Upcoming Training