Connection Data Base for PostgreSQL flexible server

Sebastian Pacheco 181 Reputation points
2024-04-03T16:17:50.22+00:00

Hello everyone... is there any way to create an internal connection between the pods of my AKS cluster and the DB? In the single server version I seem to remember that there was a private endpoint.

At this moment I am reading something from "Private Link", will it be the alternative for this BD version? It can be configured if my DB was created as "Public Access"

Thanks!

Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
1,965 questions
Azure Database for PostgreSQL
{count} votes

2 answers

Sort by: Most helpful
  1. Luis Arias 5,901 Reputation points
    2024-04-03T21:51:49.17+00:00

    Hi Sebastian,

    Yes to keep the communication internal between your Cluster and the DB you will need to use Private Link. Just to clarify this two concepts are highly couple, Azure Private Link is the broad service that enables secure and private connectivity to Azure services. The Private Endpoint is a component of Private Link that provides the actual connection to the service from your virtual network.

    So here an example of mechanism that you can use to keep your communication internal:

    • Private Link(Private Endpoint): Connects your AKS cluster and PostgreSQL server within your VNet.
    • VNet Integration: Deploys your PostgreSQL server into your VNet.
    • AAD Pod Identity: Uses the cluster’s managed identity as the password for the PostgreSQL connection.
    • If your DB is “Public Access”, you can switch to “Private Access” in the Azure portal.

    User's image

    Some additional references:

    If the information helped address your question, please Accept the answer.

    Luis


  2. Sebastian Pacheco 181 Reputation points
    2024-04-05T15:42:31.39+00:00

    I created a new test DB (Public access) with the Private endpoint feature enabled, I also had to create a network and subnet and put the DB there.

    Once everything was configured in the Networks option, the DB had the Private endpoint approved... now I have 2 links:

    demodb-flex.postgres.database.azure.com

    demodb-flex.privatelink.postgres.database.azure.com

    Questions:

    1.- I have these 2 connection options now?

    2.- Can the url "demodb-flex.privatelink.postgres.database.azure.com" also be accessible from outside? I thought that link was only internal.

    If I deactivate the "Public access" option then I can no longer connect to the DB in any way :<
    User's image

    To have access (to both urls) I must enable the "Public access" option and add my IP to the "Firewall rule name" and to have access from within my cluster I must also enable the "Allow public access from any Azure service within Azure" option to this server"

    0 comments No comments