# Pods cannot access internet

**URL:** <https://discuss.kubernetes.io/t/pods-cannot-access-internet/28871>\
**Category:** General Discussions\
**Created:** [July 2, 2024, 12:21pm UTC](https://discuss.kubernetes.io/t/pods-cannot-access-internet/28871 "2024-07-02T12:21:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TennyKs](https://avatars.discourse-cdn.com/v4/letter/t/ecccb3/32.png) [@TennyKs](https://discuss.kubernetes.io/u/TennyKs)\
**Post date:** [July 2, 2024, 12:21pm UTC](https://discuss.kubernetes.io/t/pods-cannot-access-internet/28871/1 "2024-07-02T12:21:46Z")

</div>

### Cluster information:

Kubernetes version: 1.30.2  
Installation method: Apt  
Host OS: Debian 12  
CNI and version: Calico v3.28.0  
CRI and version: Containerd v1.7.18

Hi everyone, I have deployed my first local Kubernetes cluster with 2 nodes using kubeadm, and i ran into some issues when wanting to access internet inside a pod.  
I can deploy and run pods, but they don’t have access to internet, and i cannot figure out why. I do not have a firewall enable, and the ports are open.  
If i do not require an internet connection, everything works.

I checked the logs of CoreDNS and i found theses errors if i try to ping google:

```auto
[ERROR] plugin/errors: 2 www.google.com. A: read udp 192.168.189.107:37389->192.168.0.1:53: i/o timeout
[ERROR] plugin/errors: 2 www.google.com. AAAA: read udp 192.168.189.107:34070->192.168.0.1:53: i/o timeout
[ERROR] plugin/errors: 2 www.google.com. AAAA: read udp 192.168.189.107:53489->192.168.0.1:53: i/o timeout
[ERROR] plugin/errors: 2 www.google.com. A: read udp 192.168.189.107:45772->192.168.0.1:53: i/o timeout

```

I stuck with this problem, if anyone could help me, I would greatly appreciate it !

---

<div class="post-metadata">

**Author:** ![tengqm](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/tengqm/32/15342_2.png) [@tengqm](https://discuss.kubernetes.io/u/tengqm)\
**Post date:** [July 11, 2024, 3:04am UTC](https://discuss.kubernetes.io/t/pods-cannot-access-internet/28871/2 "2024-07-11T03:04:15Z")

</div>

Looks like your upstream DNS server is manually set to 192.168.0.1 somehow, and it is not working.

---

<div class="post-metadata">

**Author:** ![longtds](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/longtds/32/15344_2.png) [@longtds](https://discuss.kubernetes.io/u/longtds)\
**Post date:** [July 11, 2024, 6:19am UTC](https://discuss.kubernetes.io/t/pods-cannot-access-internet/28871/3 "2024-07-11T06:19:29Z")

</div>

In the Debian system, the `kubelet` configuration file option `resolvConf` should be modified to use `/run/systemd/resolve/resolv.conf` instead of the default `/etc/resolv.conf` .

---

<div class="post-metadata">

**Author:** ![Senthil\_riqui](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/senthil_riqui/32/15447_2.png) [@Senthil\_riqui](https://discuss.kubernetes.io/u/Senthil_riqui)\
**Post date:** [July 25, 2024, 3:55pm UTC](https://discuss.kubernetes.io/t/pods-cannot-access-internet/28871/4 "2024-07-25T15:55:32Z")

</div>

Is this issue fixed @TennyKs
