I created a Azure hosted Postgresql instance and got the public name to access it. After configuring the security settings I am able to access it from every location I want.
If I configure the services in my AKS cluster with that name, then the IP of postgresql is resolved in the cluster internally also to the global IP address of postgresql, as in the case when I access it from my local machine. So it seems to me that the packages for the database will be routed over the internet.
Since I am with my AKS already the Azure intern network, I wonder if there is a way to connect the Azure intern Postgresql through the internal Azure network to my AKS cluster. The global Postgresql name seems here the wrong approach.