What URL and ports do I specify in my apps for inter service commuincation?

My app is set up like orchestrator pattern as follows

WebClient --> Orchestrator Service ___Service1
                                  | __ Service2
                                  |__ Service3

Where each component service is a container in a pod.

WebClient selects some kind of pipeline to execute to the orchestrator service, orchestrator then depending what the webclient selected has to call one ore more services and merge the results into a single response for the web client.

My question is, before building my containers, what URL/port do I code into my orchestrator service for calling the downstream services? And same for service to service communication.

Say one of my services needs to make a post request to another service like this

 this.http.post('https://localhost:44327/api/ner', fd, {
      reportProgress: true,

But I don’t know in advance what the URL and port should be inside the Kubernetes cluster of the other pod where the service I want to communicate with resides, or do I?

You have to create a Service (the kubernetes resource) pointing to the pods serving your service.

Then you use the name of the K8s service to access the pod.

When you create a deployment and in it you have defined the pods/services I only recall specifying ports for each service. However inside the container (application) what is the URL or IP that I use? Is it always

Maybe can you provide an example using one pod making a request to another pod?

After creating a deployment, you have to create a service: for example with:

kubectl create service my-svc […]

Then you can access the pods behind this service at http://my-svc

More info on services: