the same IP for pod and for service external IP

5/9/2020

I took IP of pod and assign it to externalIP of service. Also I tried to assign not assigned IP to it. It works in any way and I am not able to find any side effects. Do you see any possible issue with such solution?

-- dmitrdv
google-kubernetes-engine
kubernetes
kubernetes-pod

2 Answers

5/9/2020

The external IP field of a service is only used for tracking purposes, it is descriptive rather than proscriptive. You could put whatever you want there, the only thing I know of which uses that field is external-dns, beyond that it’s only for humans so the system can report back what the IP or hostname is with type LoadBalancer.

-- coderanger
Source: StackOverflow

5/11/2020

As mentioned in the Kubernetes Service documentation:

externalIPs are not managed by Kubernetes and are the responsibility of the cluster administrator.

ExternalIP is good when you want to have the control of your service IP's, from the other side, the High availability will be comprimissed, since if one node of the cluster die you will lost the route to the service.

In this blog there's a good explantion about ExternalIP

-- KoopaKiller
Source: StackOverflow