rke2 cluster cannot set coredns corefile correctly.
- Dominant language
- Mustache
- Stars
- 146
- Forks
- 145
- Avg merge
- 6d 5h
- Merged PRs (30d)
- 2
Description
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?
Contributor guide
Assessment
This issue has not been assessed yet.