How to configure the egress of pods for connecting to other Azure services through their private endpoints?

Bergs 60 Reputation points
2024-09-18T06:02:17.68+00:00

For reference, our organization's Azure account is being managed by a 3rd-party who specialized on security. I was given a limited access to our AKS clusters that are newly created. I'm not sure how much they changed it from the default configuration. What I found are all AKS clusters using Azure CNI Node Subnet with Calico as Network policy, and some of the clusters are sharing VNET subnets with thousands of IP addresses.

They closed public accesses to most of the other Azure services/resources(Container Registries, Service Busses, Storage Accounts, App Services, etc.) and can only be accessed through their private endpoints, but they also put a firewall around it too.

We're about to try using NAT Gateway as egress, but those handling the firewall says that it won't work because it will access the aforementioned services publicly instead of the private endpoint. What are my choices for the egress?

Also, please include how to back-up the configuration and to revert the changes. Thanks!

Azure Kubernetes Service
Azure Kubernetes Service
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
2,458 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Prrudram-MSFT 28,286 Reputation points Microsoft Employee Moderator
    2024-09-18T09:41:09.7033333+00:00

    Hello @Bergs

    If I understand correctly, I see that you said your organization has implemented a secure environment for your AKS clusters. Regarding your question about egress options, you mentioned that your organization is planning to use NAT Gateway as egress. However, your security team has concerns that it will access the services publicly instead of the private endpoint.
    In this case, you may want to consider using Azure Firewall to protect your AKS clusters and secure outbound and inbound traffic. Azure Firewall can be used to restrict egress traffic and provide secure access to external resources. You can use Azure Firewall to create a DNAT rule that translates the public IP address of the firewall to the private IP address of the service endpoint. This way, your AKS cluster can access the services through the private endpoint, and the traffic will be secured by Azure Firewall. To back up the configuration of your AKS cluster, you can use the az aks show command to retrieve the current configuration of your cluster. You can also use the az aks get-credentials command to download the Kubernetes configuration file for your cluster.
    This file contains the configuration of your cluster, including the API server endpoint, authentication credentials, and cluster certificate. To revert the changes, you can use the az aks update command to update the configuration of your AKS cluster. You can also use the Kubernetes configuration file to revert the changes made to your cluster.

    I hope this helps! Let me know if you have any other questions.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.