We have a system of two application A & B deployed over kubernetes cluster. What we need is to set an event/trigger in kubernetes. So each time a pod of application B is created, it will trigger an action to add its IP to configmap. Also when any pod of application B is deleted, it will trigger an action to remove its IP from the configmap.
Is there any built in object in kubernetes to perform such function, or do we need a 3rd party plugin?
Basically you have two options:
The later is at the container level, but should work for your use case as well.