Just wondering if anyone has code/examples of how to create an authentication layer for a Plumber API, running on Kubernetes.
The background is that we're trying to build an architecture for deploying R models on k8s, with Plumber used to define the API. However, Plumber doesn't provide authn out of the box, which means (I guess) we have to do it ourselves.
Any links, example code, articles etc much appreciated.
What I ended up doing was installing Traefik as a reverse proxy/ingress controller on the cluster, and enabling basic auth. Traefik also has built-in support for TLS, which made it a lot easier to enable HTTPS.
As a starting point, I used a colleague's how-to guide here:
If you're using Azure you can pretty much follow the instructions there verbatim, just substitute your own deployment and service config in the yaml. For other cloud providers, the steps to create Azure resources won't be relevant but the bits involving kubectl and helm will still apply.