0
votes

I have a single node kubernetes cluster and a watcher which watches for services, pods and endpoints. The goal of the watcher is to watch for changes in service endpoints and get the IPs from the endpoints and update them as members to haproxy for load balancing.

I am able to do that. Now I want to update the service external IP with the IP which is listening for requests on haproxy. Is it possible to update the external IP from the watcher.

Note: I have written the watcher in python.

Do you mean you want to update service's External IP without watcher's notification?Crazykev
No, Using the watcher I am creating load balancers for a service. Finally I want to update the service' External IP with the load balancer's IP. Is it possible to update a service object from a watcher? I tried to update the External IP using PATCH, but that doesn't seem to work because, the ExternalIP is part of 'status' resource which will be ignored durin POST/PUT/PATCH operations.Pradeep