Skip to content

Commit c8ed043

Browse files
authored
Removed guidance to use managed node resource group
You shouldn't use the managed node resource group. I updated the documentation to create the static IP in a standalone resource group instead.
1 parent 5546a09 commit c8ed043

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

articles/aks/static-ip.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,17 @@ This article shows you how to create a static public IP address and assign it to
2525

2626
## Create a static IP address
2727

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
2929

3030
```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
3632
```
3733
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.
3935
4036
```azurecli-interactive
4137
az network public-ip create \
42-
--resource-group MC_myResourceGroup_myAKSCluster_eastus \
38+
--resource-group myNetworkResourceGroup \
4339
--name myAKSPublicIP \
4440
--sku Standard \
4541
--allocation-method static
@@ -51,18 +47,20 @@ This article shows you how to create a static public IP address and assign it to
5147
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*.
5248
5349
```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
5551
```
5652
5753
## Create a service using the static IP address
5854
5955
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.
6056
6157
```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)
6260
az role assignment create \
63-
--assignee <Client ID> \
61+
--assignee ${CLIENT_ID} \
6462
--role "Network Contributor" \
65-
--scope /subscriptions/<subscription id>/resourceGroups/<MC_myResourceGroup_myAKSCluster_eastus>
63+
--scope ${RG_SCOPE}
6664
```
6765
6866
> [!IMPORTANT]
@@ -75,7 +73,7 @@ This article shows you how to create a static public IP address and assign it to
7573
kind: Service
7674
metadata:
7775
annotations:
78-
service.beta.kubernetes.io/azure-load-balancer-resource-group: MC_myResourceGroup_myAKSCluster_eastus
76+
service.beta.kubernetes.io/azure-load-balancer-resource-group: myNetworkResourceGroup
7977
name: azure-load-balancer
8078
spec:
8179
loadBalancerIP: 40.121.183.52

0 commit comments

Comments
 (0)