Kubernetes version: v1.22.15
Cloud being used: on-premise
Installation method: kubespray v2.20.0
Host OS: Ubuntu 20.04.5 LTS
When I installed kubernetes in the same way as before and started the container with the docker run command on node, the Internet inside the docker became available (kubespray version v2.16.0 (bcf6959), and kube_version v1.21.7).
I thought that setting the docker_iptables_enabled value to true would make the internet work fine in docker.
However, this time the internet is not working inside docker.
The internet runs well inside a kubernetes pod.
My kubelet is working well (systemctl status kubelet.service) and coredns pod is also working well (kubectl get pods -n kube-system).
The content of the /etc/resolv.conf file inside docker is as follows:
root@605711debd57:/# cat /etc/resolv.conf search default.svc.cluster.local svc.cluster.local nameserver 10.233.0.3 nameserver 127.0.0.53 options ndots:2 timeout:2 attempts:2
If you change the contents of the above file to only
nameserver 220.127.116.11, the Internet inside docker works fine.
I don’t know what part I need to debug. Any suggestions would be very helpful!