Skip to content

Commit 01d7f4f

Browse files
committed
added guidance to rotate server secret
1 parent e783e46 commit 01d7f4f

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

articles/azure-arc/kubernetes/azure-rbac.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ A conceptual overview of this feature is available in the [Azure RBAC on Azure A
5757
az ad app update --id "${SERVER_APP_ID}" --set groupMembershipClaims=All
5858
```
5959
60-
1. Create a service principal and get its `password` field value. This value is required later as `serverApplicationSecret` when you're enabling this feature on the cluster.
60+
1. Create a service principal and get its `password` field value. This value is required later as `serverApplicationSecret` when you're enabling this feature on the cluster. Please note that this secret is valid for 1 year and will need to be [rotated after that](azure-rbac#refresh-the-secret-of-the-server-application).
6161
6262
```azurecli
6363
az ad sp create --id "${SERVER_APP_ID}"
@@ -531,6 +531,19 @@ node-2 Ready agent 6m42s v1.18.14
531531
node-3 Ready agent 6m33s v1.18.14
532532
```
533533

534+
## Refresh the secret of the server application
535+
536+
If the secret for the server application's service principal has expired, you will need to rotate it.
537+
538+
```azurecli
539+
SERVER_APP_SECRET=$(az ad sp credential reset --name "${SERVER_APP_ID}" --credential-description "ArcSecret" --query password -o tsv)
540+
```
541+
542+
Update the secret on the cluster.
543+
```azurecli
544+
az connectedk8s enable-features -n <clusterName> -g <resourceGroupName> --features azure-rbac --app-id "${SERVER_APP_ID}" --app-secret "${SERVER_APP_SECRET}"
545+
```
546+
534547
## Next steps
535548

536549
> [!div class="nextstepaction"]

articles/azure-arc/kubernetes/troubleshooting.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ To resolve this issue, try the following steps.
155155
cluster-metadata-operator-664bc5f4d-chgkl 2/2 Running 0 4m14s
156156
clusterconnect-agent-7cb8b565c7-wklsh 2/3 CrashLoopBackOff 0 1m15s
157157
clusteridentityoperator-76d645d8bf-5qx5c 2/2 Running 0 4m15s
158-
config-agent-65d5df564f-lffqm 1/2 CrashLoopBackOff 0 1m14s
158+
config-agent-65d5df564f-lffqm 1/2 CrashLoopBackOff 0 1m14s
159159
```
160160

161161
3. If the certificate below isn't present, the system assigned managed identity hasn't been installed.
@@ -172,6 +172,18 @@ To resolve this issue, try the following steps.
172172

173173
4. If the `clusterconnect-agent` and the `config-agent` pods are running, but the `kube-aad-proxy` pod is missing, check your pod security policies. This pod uses the `azure-arc-kube-aad-proxy-sa` service account, which doesn't have admin permissions but requires the permission to mount host path.
174174

175+
5. If the `kube-aad-proxy` pod is stuck in `ContainerCreating` state, check whether the kube-aad-proxy certificate has been downloaded onto the cluster.
176+
177+
```console
178+
kubectl get secret -n azure-arc -o yaml | grep name:
179+
```
180+
181+
```output
182+
name: kube-aad-proxy-certificate
183+
```
184+
185+
If the certificate is missing, please contact support.
186+
175187
### Helm validation error
176188

177189
Helm `v3.3.0-rc.1` version has an [issue](https://github.com/helm/helm/pull/8527) where helm install/upgrade (used by the `connectedk8s` CLI extension) results in running of all hooks leading to the following error:

0 commit comments

Comments
 (0)