Skip to content

Commit 121b58b

Browse files
authored
Merge pull request #204093 from anraghun/rbac-secret-rotation
Azure RBAC doc updates
2 parents 1fb4c06 + e32153a commit 121b58b

File tree

3 files changed

+29
-4
lines changed

3 files changed

+29
-4
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 by default and will need to be [rotated after that](./azure-rbac.md#refresh-the-secret-of-the-server-application). Please refer to [this](/cli/azure/ad/sp/credential?view=azure-cli-latest&preserve-view=true#az-ad-sp-credential-reset) to set a custom expiry duration.
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. Please add any optional parameters you configured when this command was originally run.
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/cluster-connect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ A conceptual overview of this feature is available in [Cluster connect - Azure A
158158
kubectl create serviceaccount demo-user
159159
```
160160

161-
1. Create ClusterRoleBinding or RoleBinding to grant this [service account the appropriate permissions on the cluster](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#kubectl-create-rolebinding). Example:
161+
1. Create ClusterRoleBinding to grant this [service account the appropriate permissions on the cluster](https://kubernetes.io/docs/reference/access-authn-authz/rbac/#kubectl-create-rolebinding). Example:
162162

163163
```console
164164
kubectl create clusterrolebinding demo-user-binding --clusterrole cluster-admin --serviceaccount default:demo-user

articles/azure-arc/kubernetes/troubleshooting.md

Lines changed: 14 additions & 2 deletions
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.
@@ -168,10 +168,22 @@ To resolve this issue, try the following steps.
168168
name: azure-identity-certificate
169169
```
170170

171-
To resolve this issue, try deleting the Arc deployment by running the `az connectedk8s delete` command and reinstalling it. If the issue continues to happen, it could be an issue with your proxy settings. In that case, [try connecting your cluster to Azure Arc via a proxy](./quickstart-connect-cluster.md#connect-using-an-outbound-proxy-server) to connect your cluster to Arc via a proxy.
171+
To resolve this issue, try deleting the Arc deployment by running the `az connectedk8s delete` command and reinstalling it. If the issue continues to happen, it could be an issue with your proxy settings. In that case, [try connecting your cluster to Azure Arc via a proxy](./quickstart-connect-cluster.md#connect-using-an-outbound-proxy-server) to connect your cluster to Arc via a proxy. Please also verify if all the [network prerequisites](quickstart-connect-cluster.md#meet-network-requirements) have been met.
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)