Is there a way to hook into a Kubernetes Ingress Resource change event?

4/16/2019

I'm creating a minimal custom ingress controller in dotnet core. I can access the k8s ingress resources by querying the api server, but polling doesn't seem like a good solution to update ingress rules since in my use case they aren't changed that often but if they change, the changes should be applied right away.

Is there a way to receive notifications on ingress resource changes? Like registering a webhook or something along the lines? Or is polling the only way?

-- Markus Dresch
kubernetes
kubernetes-ingress

1 Answer

4/16/2019

What dotnet core library are you using? There is a Watch on every resource in the golang client (e.g. ingress). You can find our more about this under "Setup a Watch" section in this article

It looks like there is a Watch example in the kubernetes-client/csharp as well.

-- petomalina
Source: StackOverflow