I have a backend API & Frontend application that i want to deploy on Kubernetes, all using docker images. I know how to deploy the Frontend using a Loadbalancer service & Ingress to expose the Frontend to the public internet. The question i have is about how the backend API service will communicate with the frontend.
I want to deploy the backend API using ClusterIP service, so it's only accessible to the Frontend from within the cluster, instead of exposing the backend API using ingress, hence, and no public access to the backend API
Is this a good approach if i do decide to use Cluster IP?
& how will the Frontend be able to access the backend?
will it be using http://localhost:4000
? or if an IP is generated it'll be fixed and it won't change? What's the best way to have an URL for the backend which the frontend can call