Normally I use POD IP address at my application to register the service. But unfortunately, when some problems happened at the POD , it changes automatically. Therefore I need to register service IP address instead of POD IP address at application.yml file of Kubernetes. What is your opinion to achieve this ?
Thank you
REgards
You could Register a headless Service which is made to resolve to all IPs of the corresponding pods Without providing a new IP.
You can use service IP but service IP will change if you delete the service and recreate it. Even better is to use service name because name will not change and Kubernetes DNS system will resolve the name to service IP automatically.