To continue improving your Security Posture with Azure Private Endpoint like I demonstrated with Azure Blob Storage previously, let’s now have a look at Azure Private Endpoint with Azure Kubernetes Service (AKS) and Azure Container Registry (ACR).

Private AKS cluster just reached GA and private ACR has just been announced in Public Preview among different PaaS service now supporting Azure Private Link.

Here is how the architecture of my AKS cluster looks like now:

Architecture diagram illustrating the different services and components involved in this blog article and GitHub repository.

To summarize what I have made:

  • Private AKS cluster in its own Subnet with Private Endpoint
  • Private ACR in its own Subnet with Private Endpoint
    • I put it in the same AKS’s VNET, it’s my choice, but it could be placed in another peered VNET as well.
  • Jumpbox VM and Bastion in a VNET peered with the AKS’s VNET
    • I create a VM with only a Private IP address and I create an Azure Bastion to allow the SSH connection from within the Azure portal.
  • Custom Azure pipelines agent hosted on AKS
    • With that I’m able to push both containers and Helm chart in ACR as well as deploying the Helm chart in AKS for any of my apps.
  • Private Azure Blob Storage Account with Private Endpoint
    • Not illustrated on this image, but I am using this custom Azure pipelines agent described above to deploy Terraform for different workloads. In order to get access to this associated TF State file locked down in Blob Storage Account behind its Private Endpoint, I need to peer the AKS’s VNET with the Blob Storage account’s VNET.

If you are interested in seeing how I put all of this together, here is the PR demonstrating how I have leveraged Private Link with my AKS and ACR.

2 takeaways:

You could see on the image above that I’m using also Calico Network Policies, Kured to patch my K8S nodes, but there is more to come for sure like the new features like Azure Policy in Preview, AAD integration v2 in Preview,  Managed Identities in GA, etc. If you are looking for more best practices around security for your AKS cluster, I invite you to leverage this GitHub Repository in Work in Progress:

Hope you are enjoying those great news and updates to setup more securely your solution leveraging AKS!