Ah my team mate has spotted the error for me. And it paid off, that he has no experience with PostgreSQL yet :-)
Because the admin user for Azure Database for PostgreSQL flexible server is not "postgres" but "postgresql" Now the connection from a container in AKS works for me: $ psql "postgresql://postgresql:password12345!!@ 172.21.32.4:5432/postgres?sslmode=require" psql (17.4, server 16.6) SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off, ALPN: none) Type "help" for help. postgres=> I must find now how to add a non-super user to it next. Best regards Alex