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: support/azure/azure-kubernetes/create-upgrade-delete/error-code-serviceprincipalvalidationclienterror.md
+26-7Lines changed: 26 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,8 @@
1
1
---
2
2
title: Troubleshoot the ServicePrincipalValidationClientError error code
3
3
description: Learn how to troubleshoot the ServicePrincipalValidationClientError error when you try to create and deploy an Azure Kubernetes Service (AKS) cluster.
#Customer intent: As an Azure Kubernetes user, I want to troubleshoot the ServicePrincipalValidationClientError error code so that I can successfully create and deploy an Azure Kubernetes Service (AKS) cluster.
9
8
ms.custom: sap:Create, Upgrade, Scale and Delete operations (cluster or nodepool)
@@ -52,14 +51,28 @@ The secret that's provided for the highlighted service principal isn't valid.
52
51
53
52
## Solution 1: Reset the service principal secret
54
53
55
-
Reset the secret that's used for the service principal by running the [az ad sp credential reset](/cli/azure/ad/sp/credential#az-ad-sp-credential-reset) command:
54
+
To resolve this issue, reset the service principal secret by using one of the following methods:
55
+
56
+
- Reset the service principal's credential by running the [az ad sp credential reset](/cli/azure/ad/sp/credential#az-ad-sp-credential-reset) command:
57
+
58
+
```azurecli-interactive
59
+
az ad sp credential reset --name "01234567-89ab-cdef-0123-456789abcdef" --query password --output tsv
60
+
```
61
+
62
+
- Specify the expiration date by running the following command:
63
+
64
+
```azurecli-interactive
65
+
az ad sp credential reset --name <service-principal-name> --credential-description "New secret for AKS" --years 1
66
+
```
67
+
68
+
The preceding command resets the secret and displays it as output. Then, you can specify the new secret when you try to create the new cluster again.
69
+
70
+
For failed operations in an existing cluster, ensure that you update your AKS cluster with the new secret:
56
71
57
72
```azurecli-interactive
58
-
az ad sp credential reset --name "01234567-89ab-cdef-0123-456789abcdef" --query password --output tsv
73
+
az aks update-credentials --resource-group <resource-group> --name <aks-cluster> --reset-service-principal --client-secret <new-client-secret>
59
74
```
60
75
61
-
This command resets the secret, and displays it as output. Then, you can specify the new secret when you try again to create the new cluster.
62
-
63
76
## Solution 2: Create a new service principal
64
77
65
78
You can create a new service principal and get the secret that's associated with it by running the [az ad sp create-for-rbac](/cli/azure/ad/sp#az-ad-sp-create-for-rbac) command:
@@ -81,6 +94,12 @@ The output of the command should resemble the following JSON string:
81
94
82
95
Note the `appId` and `password` values that are generated. After you get these values, you can rerun the cluster creation command for the new service principal and secret.
83
96
97
+
To update your AKS cluster with the new service principal's credential, run the following command:
98
+
99
+
```azurecli-interactive
100
+
az aks update-credentials --resource-group <resource-group> --name <aks-cluster> --service-principal <new-client-id> --client-secret <new-client-secret>
101
+
```
102
+
84
103
## More information
85
104
86
105
-[General troubleshooting of AKS cluster creation issues](troubleshoot-aks-cluster-creation-issues.md)
0 commit comments