Hey,
You can connect the pod and the external server to the same endpoint.
You can mention the external server's endpoint in your ConfigMaps.
You can then use this endpoint directly in your code as an environment variable. But there are many scenerios where this method is not the best way to go about it.
Hope it helps!
To know more, join our Kubernetes Training in Pondicherry today.