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/static-ip.md
+10-12Lines changed: 10 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,21 +25,17 @@ This article shows you how to create a static public IP address and assign it to
25
25
26
26
## Create a static IP address
27
27
28
-
1.Use the `az aks show`[az-aks-show] command to get the node resource group name of your AKS cluster, which follows this format: `MC_<resource group name>_<AKS cluster name>_<region>`.
28
+
1.Create a resource group for your IP address
29
29
30
30
```azurecli-interactive
31
-
az aks show \
32
-
--resource-group myResourceGroup \
33
-
--name myAKSCluster
34
-
--query nodeResourceGroup
35
-
--output tsv
31
+
az group create --name myNetworkResourceGroup
36
32
```
37
33
38
-
2. Use the [`az network public ip create`][az-network-public-ip-create] command to create a static public IP address. The following example creates a static IP resource named *myAKSPublicIP* in the *MC_myResourceGroup_myAKSCluster_eastus* node resource group.
34
+
2. Use the [`az network public ip create`][az-network-public-ip-create] command to create a static public IP address. The following example creates a static IP resource named *myAKSPublicIP* in the *myNetworkResourceGroup* resource group.
@@ -51,18 +47,20 @@ This article shows you how to create a static public IP address and assign it to
51
47
3. After you create the static public IP address, use the [`az network public-ip list`][az-network-public-ip-list] command to get the IP address. Specify the name of the node resource group and public IP address you created, and query for the *ipAddress*.
52
48
53
49
```azurecli-interactive
54
-
az network public-ip show --resource-group MC_myResourceGroup_myAKSCluster_eastus --name myAKSPublicIP --query ipAddress --output tsv
50
+
az network public-ip show --resource-group myNetworkResourceGroup --name myAKSPublicIP --query ipAddress --output tsv
55
51
```
56
52
57
53
## Create a service using the static IP address
58
54
59
55
1. Before creating a service, use the [`az role assignment create`][az-role-assignment-create] command to ensure the cluster identity used by the AKS cluster has delegated permissions to the node resource group.
60
56
61
57
```azurecli-interactive
58
+
CLIENT_ID=$(az aks show --name <cluster name> --resource-group <cluster resource group> --query identity.principalId -o tsv)
59
+
RG_SCOPE=$(az group show --name myNetworkResourceGroup --query id -o tsv)
0 commit comments