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/api-server-authorized-ip-ranges.md
+18-17Lines changed: 18 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: API server authorized IP ranges in Azure Kubernetes Service (AKS)
3
3
description: Learn how to secure your cluster using an IP address range for access to the API server in Azure Kubernetes Service (AKS)
4
4
services: container-service
5
5
ms.topic: article
6
-
ms.date: 09/21/2020
6
+
ms.date: 06/20/2022
7
7
8
8
9
9
#Customer intent: As a cluster operator, I want to increase the security of my cluster by limiting access to the API server to only the IP addresses that I specify.
@@ -13,19 +13,21 @@ ms.date: 09/21/2020
13
13
14
14
In Kubernetes, the API server receives requests to perform actions in the cluster such as to create resources or scale the number of nodes. The API server is the central way to interact with and manage a cluster. To improve cluster security and minimize attacks, the API server should only be accessible from a limited set of IP address ranges.
15
15
16
-
This article shows you how to use API server authorized IP address ranges to limit which IP addresses and CIDRs can access control plane.
16
+
This article shows you how to use API server authorized IP address ranges, using the Azure CLI, to limit which IP addresses and CIDRs can access control plane.
17
17
18
18
## Before you begin
19
19
20
-
This article shows you how to create an AKS cluster using the Azure CLI.
20
+
- You need the Azure CLI version 2.0.76 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].
21
21
22
-
You need the Azure CLI version 2.0.76 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].
22
+
- To learn what IP addresses to include when integrating your AKS cluster with Azure DevOps, see the Azure DevOps [Allowed IP addresses and domain URLs][azure-devops-allowed-network-cfg] article.
23
23
24
24
### Limitations
25
25
26
26
The API server Authorized IP ranges feature has the following limitations:
27
-
- On clusters created after API server authorized IP address ranges moved out of preview in October 2019, API server authorized IP address ranges are only supported on the *Standard* SKU load balancer. Existing clusters with the *Basic* SKU load balancer and API server authorized IP address ranges configured will continue work as is but cannot be migrated to a *Standard* SKU load balancer. Those existing clusters will also continue to work if their Kubernetes version or control plane are upgraded. API server authorized IP address ranges are not supported for private clusters.
28
-
- When using this feature with clusters that use [Public IP per Node](use-multiple-node-pools.md#assign-a-public-ip-per-node-for-your-node-pools), those node pools with public IP per node enabled must use public IP prefixes and those prefixes must be added as authorized ranges.
27
+
28
+
- On clusters created after API server authorized IP address ranges moved out of preview in October 2019, API server authorized IP address ranges are only supported on the *Standard* SKU load balancer. Existing clusters with the *Basic* SKU load balancer and API server authorized IP address ranges configured will continue work as is, but they cann't be migrated to a *Standard* SKU load balancer. Existing clusters will also continue to work if their Kubernetes version or control plane are upgraded.
29
+
- API server authorized IP address ranges aren't supported with private clusters.
30
+
- When using this feature with clusters that use [Public IP per Node](use-multiple-node-pools.md#assign-a-public-ip-per-node-for-your-node-pools), those node pools with public IP per node enabled must use public IP prefixes, and those prefixes must be added as authorized ranges.
29
31
30
32
## Overview of API server authorized IP ranges
31
33
@@ -62,11 +64,11 @@ az aks create \
62
64
>
63
65
> The upper limit for the number of IP ranges you can specify is 200.
64
66
>
65
-
> The rules can take up to 2min to propagate. Please allow up to that time when testing the connection.
67
+
> The rules can take up to two minutes to propagate. Please allow up to that time when testing the connection.
66
68
67
69
### Specify the outbound IPs for the Standard SKU load balancer
68
70
69
-
When creating an AKS cluster, if you specify the outbound IP addresses or prefixes for the cluster, those addresses or prefixes are allowed as well. For example:
71
+
While creating an AKS cluster, if you specify the outbound IP addresses or prefixes for the cluster, they are allowed as well. For example:
70
72
71
73
```azurecli-interactive
72
74
az aks create \
@@ -146,11 +148,11 @@ The above operations of adding, updating, finding, and disabling authorized IP r
146
148
147
149
## How to find my IP to include in `--api-server-authorized-ip-ranges`?
148
150
149
-
You must add your development machines, tooling or automation IP addresses to the AKS cluster list of approved IP ranges in order to access the API server from there.
151
+
You must add your development machines, tooling, or automation IP addresses to the AKS cluster list of approved IP ranges to access the API server from there.
150
152
151
-
Another option is to configure a jumpbox with the needed tooling inside a separate subnet in the Firewall's virtual network. This assumes your environment has a Firewall with the respective network, and you have added the Firewall IPs to authorized ranges. Similarly, if you have forced tunneling from the AKS subnet to the Firewall subnet, than having the jumpbox in the cluster subnet is fine too.
153
+
Another option is to configure a jumpbox with the necessary tooling inside a separate subnet in the firewall's virtual network. This assumes your environment has a firewall with the respective network, and you've added the firewall IPs to authorized ranges. Similarly, if you've forced tunneling from the AKS subnet to the firewall subnet, having the jumpbox in the cluster subnet is also okay.
152
154
153
-
Add another IP address to the approved ranges with the following command.
155
+
To add another IP address to the approved ranges, use the following commands.
154
156
155
157
```bash
156
158
# Retrieve your IP address
@@ -163,21 +165,19 @@ az aks update -g $RG -n $AKSNAME --api-server-authorized-ip-ranges $CURRENT_IP/3
163
165
```
164
166
165
167
> [!NOTE]
166
-
> The above example appends the API server authorized IP ranges on the cluster. To disable authorized IP ranges, use az aks update and specify an empty range "".
168
+
> The above example appends the API server authorized IP ranges on the cluster. To disable authorized IP ranges, use `az aks update` and specify an empty range "".
167
169
168
-
Another option is to use the belowcommand on Windows systems to get the public IPv4 address, or you can use the steps in [Find your IP address](https://support.microsoft.com/en-gb/help/4026518/windows-10-find-your-ip-address).
170
+
Another option is to use the followingcommand on Windows systems to get the public IPv4 address, or you can follow the steps in [Find your IP address](https://support.microsoft.com/en-gb/help/4026518/windows-10-find-your-ip-address).
169
171
170
172
```azurepowershell-interactive
171
173
Invoke-RestMethod http://ipinfo.io/json | Select -exp ip
172
174
```
173
175
174
-
You can also find this address by searching "what is my IP address"in an internet browser.
176
+
You can also find this address by searching on *what is my IP address*in an internet browser.
175
177
176
178
## Next steps
177
179
178
-
In this article, you enabled API server authorized IP ranges. This approach is one part of how you can run a secure AKS cluster.
179
-
180
-
For more information, see [Security concepts forapplications and clustersin AKS][concepts-security] and [Best practices forcluster security and upgradesin AKS][operator-best-practices-cluster-security].
180
+
In this article, you enabled API server authorized IP ranges. This approach is one part of how you can securely run an AKS cluster. For more information, see [Security concepts forapplications and clustersin AKS][concepts-security] and [Best practices forcluster security and upgradesin AKS][operator-best-practices-cluster-security].
0 commit comments