# Wrong IP given to Pod

**URL:** <https://forums.suse.com/t/wrong-ip-given-to-pod/16018>\
**Category:** SUSE Rancher Prime\
**Created:** [December 5, 2019, 9:30am UTC](https://forums.suse.com/t/wrong-ip-given-to-pod/16018 "2019-12-05T09:30:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pcasis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/pcasis/32/5494_2.png) [@pcasis](https://forums.suse.com/u/pcasis)\
**Post date:** [December 5, 2019, 9:30am UTC](https://forums.suse.com/t/wrong-ip-given-to-pod/16018/1 "2019-12-05T09:30:19Z")

</div>

Hello,

I’m using Calico as the CNI in my Rancher launched K8s cluster.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/8/89ad244684502c22b245e0f2e5cb2784cecf14a1.png)

The calico IP pool is the following :  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/4/48a4786a663d7432ea52567417323e4e4fe80828.png)

When I deploy a Pod, it gets a correct IP (10.42.X.X). However, sometime the Pod is restarted and gets a wriong IP (172.17.X.X.). It seems that 172.17.X.X is the docker0 bridge ip pool.

Have you an idea on why it gives sometimes a wrong ip ? Have you got the same issue ?

Regards

---

<div class="post-metadata">

**Author:** ![huegelc](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/huegelc/32/5678_2.png) [@huegelc](https://forums.suse.com/u/huegelc)\
**Post date:** [December 5, 2019, 7:24pm UTC](https://forums.suse.com/t/wrong-ip-given-to-pod/16018/2 "2019-12-05T19:24:18Z")

</div>

Can you do a `kubectl cluster-info dump | grep -m 1 cluster-cidr`

---

<div class="post-metadata">

**Author:** ![pcasis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/pcasis/32/5494_2.png) [@pcasis](https://forums.suse.com/u/pcasis)\
**Post date:** [December 6, 2019, 7:47am UTC](https://forums.suse.com/t/wrong-ip-given-to-pod/16018/3 "2019-12-06T07:47:02Z")

</div>

Here is the cluster-cidr :

```
# ps -ef | grep "cluster-cidr"
root 1918 1839 0 Nov19 ? 00:07:43 kube-proxy --v=2 --healthz-bind-address=127.0.0.1 --cluster-cidr=10.42.0.0/16 ... ... ...
root 5909 5859 1 08:37 ? 00:00:05 kube-controller-manager --cloud-provider= --cluster-cidr=10.42.0.0/16 ... ... ...
```

---

<div class="post-metadata">

**Author:** ![pcasis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/pcasis/32/5494_2.png) [@pcasis](https://forums.suse.com/u/pcasis)\
**Post date:** [December 11, 2019, 9:01am UTC](https://forums.suse.com/t/wrong-ip-given-to-pod/16018/4 "2019-12-11T09:01:41Z")

</div>

No one has got the same kind of issue ?

Regards

---

<div class="post-metadata">

**Author:** ![pcasis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/pcasis/32/5494_2.png) [@pcasis](https://forums.suse.com/u/pcasis)\
**Post date:** [December 11, 2019, 2:58pm UTC](https://forums.suse.com/t/wrong-ip-given-to-pod/16018/5 "2019-12-11T14:58:48Z")

</div>

Ok, so it is a bug related to Rancher :

> <https://github.com/kubernetes/kubernetes/issues/86091>
>
> What happened:
> One of the pods in the cluster has been started with docker networking instead of none. This causes the IP...

  

> <https://github.com/rancher/rancher/issues/23284>
>
> Note: This is not a consistent issue and upgrade and getting assigned an incorrect IP can affect any pod. There is...

---

<div class="post-metadata">

**Author:** ![mlechner](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/mlechner/32/5909_2.png) [@mlechner](https://forums.suse.com/u/mlechner)\
**Post date:** [December 17, 2019, 1:05pm UTC](https://forums.suse.com/t/wrong-ip-given-to-pod/16018/6 "2019-12-17T13:05:47Z")

</div>

Hi @pcasis  
we had the same issue on one cluster. Pods running on one specific worker-node got the pod IP from docker-bridge. Drain, delete and reconfigure this worker-node helped.  
Maybe that’s related to Kubernetes upgrade to 1.16.3.

How can we monitor stuff like this? We came only across this issue because of application connection errors.

---

<div class="post-metadata">

**Author:** ![pcasis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/pcasis/32/5494_2.png) [@pcasis](https://forums.suse.com/u/pcasis)\
**Post date:** [December 17, 2019, 3:49pm UTC](https://forums.suse.com/t/wrong-ip-given-to-pod/16018/7 "2019-12-17T15:49:12Z")

</div>

Our Kubernetes version is 1.15.

> [@mlechner](#):
>
> How can we monitor stuff like this? We came only across this issue because of application connection errors.

Good question 🙂 We’ve enabled Monitoring and Logs tools (Grafana/Prometheus/Loki). But those containers are impacted by the IP issue so we can’t really investigate on it … 😢
