Sir, how will the UI pod or web-pod know that it has to redirect the traffic particularly to the DB Cluster IP service. Since there may be other cluster IP services running inside the cluster

(project-1-kubernetes_services/deploy at main · Deepakranjanmishra/project-1-kubernetes_services · GitHub)

(Diagram) https://raw.githubusercontent.com/janakiramm/Kubernetes-multi-container-pod/master/multi-container-pod.png

I have a Frontend pod (web-pod) and a database pod (db-pod).
The frontend pod can be accessed from outside using a nodeport service , web-svc.yml . db-svc.yml is the cluster IP service for inter pod communication.
My question how will the UI pod or web-pod know that it has to redirect the traffic particularly to the DB Cluster IP service(db-svc). Since there may be other cluster IP services running inside the cluster ?