Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rke2 cluster cannot set coredns corefile correctly. #94

Open
zeddit opened this issue Feb 17, 2023 · 1 comment
Open

rke2 cluster cannot set coredns corefile correctly. #94

zeddit opened this issue Feb 17, 2023 · 1 comment

Comments

@zeddit
Copy link

zeddit commented Feb 17, 2023

I want to add a nameserver for some domains for my cluster, e.g. I want my coredns corefile to be like below:

.:53 {
        errors
        health
        kubernetes cluster.local in-addr.arpa ip6.arpa {
           pods insecure
           fallthrough in-addr.arpa ip6.arpa
        }
        prometheus :9153
        forward . 172.16.0.1
        cache 30
        loop
        reload
        loadbalance
    }
    example.org:53 { #adding a block here
        errors
        cache 30
        forward . 10.150.0.1
    }

So I set my helm chart values to be like:

 servers:
    - zones:
      - zone: .
      plugins:
      port: 53
      plugins:
      - name: errors
      - name: health
        configBlock: |-
          lameduck 5s
      - name: ready
      - name: kubernetes
        parameters: cluster.local in-addr.arpa ip6.arpa
        configBlock: |-
          pods insecure
          fallthrough in-addr.arpa ip6.arpa
          ttl 30
      - name: prometheus
        parameters: 0.0.0.0:9153
      - name: forward
        parameters: . /etc/resolv.conf
      - name: cache
        parameters: 30
      - name: loop
      - name: reload
      - name: loadbalance
    - zones:
      - zone: example.org
      plugins:
      - name: errors
      - name: forward
        parameters: . 10.150.0.1
      - name: cache
        parameters: 30

And in rke2 cluster, these settings should be put under /var/lib/rancher/rke2/server/manifests/rke2-coredns-config.yaml.

However, these configuration cannot take effect. I wonder if I am doing wrong to set multiple nameservers?

@hagaibarel
Copy link
Collaborator

Not sure I understand what you're trying to achieve, you installed the chart but require that the coredns config be on a specific path on the host file system?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants