# Docker container has no internet

**URL:** <https://discuss.kubernetes.io/t/docker-container-has-no-internet/22136>\
**Category:** General Discussions\
**Tags:** development, network\
**Created:** [November 30, 2022, 10:59am UTC](https://discuss.kubernetes.io/t/docker-container-has-no-internet/22136 "2022-11-30T10:59:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![daeyang.cho](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/daeyang.cho/32/11285_2.png) [@daeyang.cho](https://discuss.kubernetes.io/u/daeyang.cho)\
**Post date:** [November 30, 2022, 10:59am UTC](https://discuss.kubernetes.io/t/docker-container-has-no-internet/22136/1 "2022-11-30T10:59:47Z")

</div>

### Cluster information:

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](https://github.com/kubernetes-sigs/kubespray/commit/bcf695913f5332c0acf08b206cc055c9482664d9)), 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:

```auto
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 8.8.8.8`, the Internet inside docker works fine.

I don’t know what part I need to debug. Any suggestions would be very helpful!
