I have a website with
a react frontend container
a node backend container
an admin panel container
a database on a separate machine
All the containers are stateless and i want to run
2 instances of frontend load balanced on domain.com,
2 instances of backend on backend.domain.com,
1 instance of admin panel on panel.domain.com
I am currently running this in docker with nginx reverse proxy to direct traffic to containers based on subdomain.
I want to move this setup to kubernetes so
My questions are
What all can be the pods in this case?
What will be the deployment here? Will there be multiple deployements?
Do I need a nginx reverse proxy to direct traffic based on sub domain to pods?
Yes you can to do it. 2 way. First way create docker regestry and deploy in Kubernetes Second way deploy all in kubernetes.
IMO you can go with below k8s constructs
Pods will be taken care by deployment, and service will ensure that you can scale deployment as you will.
For ingress you can start trying out it, nginx ingress controller https://kubernetes.io/docs/concepts/services-networking/ingress/#ingress-controllers, probably load-test and try with ingress controller suits for your need.
For database I would right now, to keep in separate machine itself, don't migrate to k8s now, get comfortable with k8s for a while