I have a REST-api in one pod that needs to whitelist all hostnames or ips that connects to it. In another deployment/pod I have my own kotlin program that tries to connect to the REST-api
Both deployment are exposed with ClusterIp services. I can do a "ping" request. So that works fine.
I thougt that one way was to use the service dns-name of the kotlin service. But that ip is not the same as that from the kotlin-pods.
The REST-api doesn't support subnet masks. And I can't really add all ips in the k8s cluster.