Pods get the same IP address


#1

Hello,
What i found is when pods running in replica mode are going into CrashloopBackOff status.
After checking the pods I found some of them with the exact same IP address like other pods.

> kubectl version
> Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.0", GitCommit:"ddf47ac13c1a9483ea035a79cd7c10005ff21a6d", GitTreeState:"clean", BuildDate:"2018-12-03T21:04:45Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"}
> Server Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.0", GitCommit:"ddf47ac13c1a9483ea035a79cd7c10005ff21a6d", GitTreeState:"clean", BuildDate:"2018-12-03T20:56:12Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"}

I’m using weave-net for network policy.


#2

Hello @Prakash_Rathod,

What is the output of kubectl get pods <failed pod> -o yaml to see what the last event for the pod was? If you could also look at kubectl logs <failed pod> to see if there are any pod logs still present?

Thanks,

Ralph


#3

Hello @ralph,
Thanks for replying, that issue has been resolved.
Problem was in deployment configuration file where i was using hostNetwork: true due to which all pods were getting same local ip address in replica.

Regards,
Prakash