You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/aks/limit-egress-traffic.md
+18-15Lines changed: 18 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,15 +6,15 @@ author: iainfoulds
6
6
7
7
ms.service: container-service
8
8
ms.topic: article
9
-
ms.date: 05/14/2019
9
+
ms.date: 06/06/2019
10
10
ms.author: iainfou
11
11
12
12
#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.
13
13
---
14
14
15
15
# Preview - Limit egress traffic for cluster nodes and control access to required ports and services in Azure Kubernetes Service (AKS)
16
16
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.
18
18
19
19
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.
20
20
@@ -26,7 +26,7 @@ This article details what network ports and fully qualified domain names (FQDNs)
26
26
27
27
## Before you begin
28
28
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].
30
30
31
31
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:
32
32
@@ -52,7 +52,7 @@ For management and operational purposes, nodes in an AKS cluster need to access
52
52
53
53
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.
54
54
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.
56
56
57
57
In AKS, there are two sets of ports and addresses:
58
58
@@ -68,23 +68,26 @@ The following outbound ports / network rules are required for an AKS cluster:
68
68
69
69
* TCP port *443*
70
70
* 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.
71
72
72
73
The following FQDN / application rules are required:
|*.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. |
82
88
83
89
## Optional recommended addresses and ports for AKS clusters
84
90
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
88
91
* UDP port *53* for DNS
89
92
90
93
The following FQDN / application rules are recommended for AKS clusters to function correctly:
0 commit comments