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
Aspsk/fix dns resolution on kind #24713
Conversation
e1a1486
to
c30501d
Compare
c30501d
to
1fe045f
Compare
/test |
1fe045f
to
dce2efc
Compare
/test |
The
So removing the test commit, everything looks fine |
5729751
to
bc710b3
Compare
We are using our Kind provisioning script to create K8s clusters when testing in the CI. Recently, we discovered that on some kernels a default DNS resolver, which is dockerd, is troublesome for the BPF host routing, which we want to test in the CI (#23283). Fix this by patching the coredns configmap after creating a kind cluster to point to the 8.8.8.8 resolver. Alternative fixes (may still be applied later): * Pass a custom /etc/resolv.conf to kubelet via --resolv-conf in the Kind / kubeadm config. * Override /etc/resolv.conf of Kind nodes after creating a cluster (no race condition, as CoreDNS pods won't be started, as a CNI is not ready). * Patch Kind to allow users to specify custom DNS entries (i.e., docker run --dns="1.1.1.1,8.8.8.8"). Fixes: #23283 Fixes: #23330 Signed-off-by: Anton Protopopov <aspsk@isovalent.com>
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
# This is required because in case of BPF Host Routing we bypass iptables thus | ||
# breaking DNS. See https://github.com/cilium/cilium/issues/23330 | ||
NewCoreFile=$(kubectl get cm -n kube-system coredns -o jsonpath='{.data.Corefile}' | sed 's,forward . /etc/resolv.conf,forward . 8.8.8.8,' | sed -z 's/\n/\\n/g') | ||
kubectl patch configmap/coredns -n kube-system --type merge -p '{"data":{"Corefile": "'"$NewCoreFile"'"}}' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this command synchronous? If not, is there a way to wait for the change to be done?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean exactly? I think that after this command is finished, the coredns
CM will not expose the old value. The coredns or any other non-hostns pods are not running at this stage yet
Have you had a successful run with https://github.com/cilium/cilium/blob/master/.github/workflows/conformance-datapath.yaml#L23 uncommented? |
Affirmative (the only thing which failed was net-next on geneve/dsr, as is listed above: #24713 (comment)) |
Only bce8d9e needs to be backported to v1.13. |
Patch coredns configmap to bypass docker DNS resolver in kind and use 8.8.8.8. Re-enable masquerading and fast routing for the EGW test.
Fixes: #23283
Fixes: #23330