I'm currently using two separate Docker Compose services on my cloud virtual machine (CVM). One service is a .NET application running on port 8080, and the other is a FastAPI application running on port 8000. Some of the FastAPI endpoints need to call the .NET service's endpoints. I'm looking to add NGINX to these services because I need SSL support for both. I'm weighing two main options: 1) Combine everything into a single Docker Compose file with NGINX included, or 2) Set up a Kubernetes NGINX Ingress Controller to manage traffic between the two services, though I'm not very familiar with Kubernetes. I'm interested in learning more about it, but I'm worried about the steep learning curve, especially since I have a project deadline approaching. Are there any other options I should consider?
5 Answers
If you want something straightforward, use Docker Compose with Traefik. It's great for reverse proxying and gives you automatic Let's Encrypt SSL certificates. I was skeptical about Kubernetes too, but it addressed many of my Docker Compose limitations once I learned it.
If your main concern is adding SSL, consider trying Caddy. It's known for being super easy to set up and can automate certificate management. Just keep in mind, you'll still need to buy a domain for SSL.
Caddy seems really straightforward! Is there a catch to using it?
If you're working on a virtual machine (CVM), Kubernetes might be overkill. Instead, check if your cloud provider has any load balancers or CDN options for managing TLS. You could just use something simpler like a Docker Compose setup with NGINX.
I'm using Tencent Cloud. I prefer not to go with a managed solution; I'm eager to learn about DevOps and improve my skills. Is there a middle ground?
Have you checked out the nginx-proxy for Docker? It automates some of the configuration for you, which can save time. It does require a bit of setup, like binding to the Docker socket, but it streamlines a lot of things if you're hesitant about writing your own NGINX configs.
I read about it but wasn't sure about binding the socket. Is it mainly to save on NGINX configuration?
To keep things simple, just start with NGINX on its own. You can always transition to a Kubernetes Ingress Controller later if you find you need to manage more services in the future.
What exactly is an Ingress Controller? Is it the same as NGINX in a container?

A friend suggested sticking with Docker Compose for NGINX as it might be simpler than Kubernetes. Do you have any recommendations for K8s exercises or resources? I'm keen on exploring Kubernetes further.