Kubernetes service dynamic upstream?

I know there’s the ingress controller, and perhaps parts of it can be reused for this, but is there a http.reverse_proxy.upstreams that can watch a kubernetes service using the k8s API and populate an upstream based on that? If not, would there be interest in one?

I suppose using dynamic srv pointing at the k8s services’ SRV record would work, but feels like there might be “TTL” issues there that a more dynamic k8s indexer might detect quicker.

In my particular case I have a custom Caddyfile that reverse proxies a mix of k8s and non-k8s upstreams so using the ingress controller doesn’t feel 100% appropriate.

1 Like

All the known/registered dynamic upstream modules are listed here: apps/http/servers/routes/handle/reverse_proxy/dynamic_upstreams

You’re probably best off writing your own if you need something specific.

1 Like

I don’t think that exists yet, but we’d love it if you wanted to write one and share it! :smiley:

This topic was automatically closed after 30 days. New replies are no longer allowed.