I am learning about highly available distributed systems and some of the concepts that keep coming up are load balancing (Nginx) and container orchestration (Kubernetes). Right now my simplified understanding of them is as so:
Nginx
- Web server that handles Http requests
- Performs load balancing via reverse proxy to other servers (usually done in a round robin manner)
- Maps a single IP (the IP of the Nginx server) to many IPs (nodes which we are load balancing over).
Kubernetes
- Container orchestration tool which keeps a defined state of a container cluster.
- Maps a single IP (the IP of the control plane?) to many IPs (nodes which have a container instance running on them).
So my question is, do we use both of these tools in conjunction? It seems like there is some overlap?
For example, if I was creating a NodeJS app to act as a microservice which exposes a REST API, would I just simply deploy my app in a Docker container, then let Kubernetes manage it? I would not need a load balancer like Nginx in front of my Kubernetes cluster?