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/update-credentials.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ To check the expiration date of your service principal, use the [az ad sp creden
37
37
```azurecli
38
38
SP_ID=$(az aks show --resource-group myResourceGroup --name myAKSCluster \
39
39
--query servicePrincipalProfile.clientId -o tsv)
40
-
az ad sp credential list --id $SP_ID --query "[].endDate" -o tsv
40
+
az ad sp credential list --id "$SP_ID" --query "[].endDate" -o tsv
41
41
```
42
42
43
43
### Reset the existing service principal credential
@@ -55,7 +55,7 @@ SP_ID=$(az aks show --resource-group myResourceGroup --name myAKSCluster \
55
55
With a variable set that contains the service principal ID, now reset the credentials using [az ad sp credential reset][az-ad-sp-credential-reset]. The following example lets the Azure platform generate a new secure secret for the service principal. This new secure secret is also stored as a variable.
Now continue on to [update AKS cluster with new service principal credentials](#update-aks-cluster-with-new-service-principal-credentials). This step is necessary for the Service Principal changes to reflect on the AKS cluster.
@@ -102,8 +102,8 @@ az aks update-credentials \
102
102
--resource-group myResourceGroup \
103
103
--name myAKSCluster \
104
104
--reset-service-principal \
105
-
--service-principal $SP_ID \
106
-
--client-secret $SP_SECRET
105
+
--service-principal "$SP_ID" \
106
+
--client-secret "$SP_SECRET"
107
107
```
108
108
109
109
For small and midsize clusters, it takes a few moments for the service principal credentials to be updated in the AKS.
0 commit comments