I've encountered this very strange problem that DNS resolution from pods would only work if no coredns pod was running on it.
I'm using the dnsPolicy 'clusterFirst' for pretty much everything and 'Default' on my coredns deployments.
Here are some debugging commands worth mentioning:
[archy@kube-master01 ~]$ kubectl -n kube-system logs -f deployments/coredns
[archy@kube-master01 ~]$ kubectl -n kube-system describe -f deployments/coredns
In the end, it boiled down to 'br_netfilter' not being loaded properly. To fix that, create the directory '/etc/modules-load.d' which is a dependency for systemd-modules-load.service
[archy@kube-master01 ~]$ sudo mkdir -m '0755' /etc/modules-load.d
Now create a file with the name of the module in /etc/modules-load.d
[archy@kube-master01 ~]$ echo 'br_netfilter' | sudo tee /etc/modules-load.d/br_netfilter.conf
Last, ensure the systemd-load-modules.service is started and enabled to load modules on boot
[archy@kube-master01 ~]$ sudo systemctl enable --now systemd-modules-load.service
Restart the service to make sure it will start properly
[archy@kube-master01 ~]$ sudo systemctl restart systemd-modules-load.service
The module should now be loaded on boot
Feel free to comment and / or suggest a topic.
Comments
Post a Comment