I am fiddling around with installing a small k8s cluster using k3s and I right now I have all of my services running standalone in a single VPS. I would like to move those to a k8s cluster.
Right now, my setup consists of the services running on the VPS and Caddy acting both as a reverse proxy and as the web server for my personal website. If I want to move it to a containerized solution, it would be nice to have a service or app that will automatically add/remove new reverse proxy entries on the Caddyfile and reload Caddy; that way I can easily add new services to my server without worrying about manually setting them up. I know something similar exists for nginx and I was planning on coding my own solution just for practice.
I then changed my mind and decided to go with a K8s instead. I found out that there’s a WIP Ingress controller for Caddy. At a first glance it seems like it acts both as a load balancer and reverse proxy.
I was checking the examples and I couldn’t find anything related to how the SSL certificates are obtained or if it’s just issuing certificates for localhost domains. How is Caddy creating certificates for custom domains? I couldn’t find any reference to the DNS provider APIs on the repository.
My questions are:
- Is it possible to pack the controller together with any of the DNS provider plugins?
- If I want to serve content from my k8s to the internet, using my custom domain, what do I need to setup other than to the config file to use my domain?
- Is the ingress controller working as a reverse proxy as well or is it just a load balancer for now?
- In my use case, do I need to have 2 instances of Caddy, so that I can install the DNS plugin to the instance handling the certificates for my domain?