Skip to content

Commit 4c31739

Browse files
authored
Merge pull request #78968 from iainfoulds/aksegressupdates
[AKS] Add latest requirements for limiting egress traffic
2 parents e9feded + 9a18e13 commit 4c31739

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

articles/aks/limit-egress-traffic.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ author: iainfoulds
66

77
ms.service: container-service
88
ms.topic: article
9-
ms.date: 05/14/2019
9+
ms.date: 06/06/2019
1010
ms.author: iainfou
1111

1212
#Customer intent: As an cluster operator, I want to restrict egress traffic for nodes to only access defined ports and addresses and improve cluster security.
1313
---
1414

1515
# Preview - Limit egress traffic for cluster nodes and control access to required ports and services in Azure Kubernetes Service (AKS)
1616

17-
By default, AKS clusters have unrestricted outbound (egress) internet access. This level of network access allows nodes and services you run to access external resources as needed. If you wish to restrict egress traffic, a limited number of ports and addresses must be accessible to maintain healthy cluster maintenance tasks. Your cluster is then configured to only use base system container images from Microsoft Container Registry (MCR) or Azure Container Registry (ACR), not external public repositories.
17+
By default, AKS clusters have unrestricted outbound (egress) internet access. This level of network access allows nodes and services you run to access external resources as needed. If you wish to restrict egress traffic, a limited number of ports and addresses must be accessible to maintain healthy cluster maintenance tasks. Your cluster is then configured to only use base system container images from Microsoft Container Registry (MCR) or Azure Container Registry (ACR), not external public repositories. You must configure your preferred firewall and security rules to allow these required ports and addresses.
1818

1919
This article details what network ports and fully qualified domain names (FQDNs) are required and optional if you restrict egress traffic in an AKS cluster. This feature is currently in preview.
2020

@@ -26,7 +26,7 @@ This article details what network ports and fully qualified domain names (FQDNs)
2626
2727
## Before you begin
2828

29-
You need the Azure CLI version 2.0.61 or later installed and configured. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI][install-azure-cli].
29+
You need the Azure CLI version 2.0.66 or later installed and configured. Run `az --version` to find the version. If you need to install or upgrade, see [Install Azure CLI][install-azure-cli].
3030

3131
To create an AKS cluster that can limit egress traffic, first enable a feature flag on your subscription. This feature registration configures any AKS clusters you create to use base system container images from MCR or ACR. To register the *AKSLockingDownEgressPreview* feature flag, use the [az feature register][az-feature-register] command as shown in the following example:
3232

@@ -52,7 +52,7 @@ For management and operational purposes, nodes in an AKS cluster need to access
5252

5353
To increase the security of your AKS cluster, you may wish to restrict egress traffic. The cluster is configured to pull base system container images from MCR or ACR. If you lock down the egress traffic in this manner, you must define specific ports and FQDNs to allow the AKS nodes to correctly communicate with required external services. Without these authorized ports and FQDNs, your AKS nodes can't communicate with the API server or install core components.
5454

55-
You can use [Azure Firewall][azure-firewall] or a 3rd-party firewall appliance to secure your egress traffic and define these required ports and addresses.
55+
You can use [Azure Firewall][azure-firewall] or a 3rd-party firewall appliance to secure your egress traffic and define these required ports and addresses. AKS does not automatically create these rules for you. The following ports and addresses are for reference as you create the appropriate rules in your network firewall.
5656

5757
In AKS, there are two sets of ports and addresses:
5858

@@ -68,23 +68,26 @@ The following outbound ports / network rules are required for an AKS cluster:
6868

6969
* TCP port *443*
7070
* TCP port *9000* and TCP port *22* for the tunnel front pod to communicate with the tunnel end on the API server.
71+
* To get more specific, see the **.hcp.\<location\>.azmk8s.io* and **.tun.\<location\>.azmk8s.io* addresses in the following table.
7172

7273
The following FQDN / application rules are required:
7374

74-
| FQDN | Port | Use |
75-
|---------------------------|-----------|----------|
76-
| *.azmk8s.io | HTTPS:443,22,9000 | This address is the API server endpoint. |
77-
| aksrepos.azurecr.io | HTTPS:443 | This address is required to access images in Azure Container Registry (ACR). |
78-
| *.blob.core.windows.net | HTTPS:443 | This address is the backend store for images stored in ACR. |
79-
| mcr.microsoft.com | HTTPS:443 | This address is required to access images in Microsoft Container Registry (MCR). |
80-
| management.azure.com | HTTPS:443 | This address is required for Kubernetes GET/PUT operations. |
81-
| login.microsoftonline.com | HTTPS:443 | This address is required for Azure Active Directory authentication. |
75+
| FQDN | Port | Use |
76+
|----------------------------|-----------|----------|
77+
| *.hcp.\<location\>.azmk8s.io | HTTPS:443, TCP:22, TCP:9000 | This address is the API server endpoint. Replace *\<location\>* with the region where your AKS cluster is deployed. |
78+
| *.tun.\<location\>.azmk8s.io | HTTPS:443, TCP:22, TCP:9000 | This address is the API server endpoint. Replace *\<location\>* with the region where your AKS cluster is deployed. |
79+
| aksrepos.azurecr.io | HTTPS:443 | This address is required to access images in Azure Container Registry (ACR). |
80+
| *.blob.core.windows.net | HTTPS:443 | This address is the backend store for images stored in ACR. |
81+
| mcr.microsoft.com | HTTPS:443 | This address is required to access images in Microsoft Container Registry (MCR). |
82+
| *.cdn.mscr.io | HTTPS:443 | This address is required for MCR storage backed by the Azure content delivery network (CDN). |
83+
| management.azure.com | HTTPS:443 | This address is required for Kubernetes GET/PUT operations. |
84+
| login.microsoftonline.com | HTTPS:443 | This address is required for Azure Active Directory authentication. |
85+
| api.snapcraft.io | HTTPS:443, HTTP:80 | This address is required to install Snap packages on Linux nodes. |
86+
| ntp.ubuntu.com | UDP:123 | This address is required for NTP time synchronization on Linux nodes. |
87+
| *.docker.io | HTTPS:443 | This address is required to pull required container images for the tunnel front. |
8288

8389
## Optional recommended addresses and ports for AKS clusters
8490

85-
The following outbound ports / network rules aren't required for AKS clusters to function correctly, but are recommended:
86-
87-
* UDP port *123* for NTP time sync
8891
* UDP port *53* for DNS
8992

9093
The following FQDN / application rules are recommended for AKS clusters to function correctly:

0 commit comments

Comments
 (0)