|
1 | 1 | ---
|
2 | 2 | title: "Use cluster connect to securely connect to Azure Arc-enabled Kubernetes clusters."
|
3 |
| -ms.date: 01/18/2023 |
| 3 | +ms.date: 04/20/2023 |
4 | 4 | ms.topic: how-to
|
5 | 5 | ms.custom: devx-track-azurecli
|
6 | 6 | description: "With cluster connect, you can securely connect to Azure Arc-enabled Kubernetes clusters without requiring any inbound port to be enabled on the firewall."
|
@@ -160,13 +160,13 @@ Before you begin, review the [conceptual overview of the cluster connect feature
|
160 | 160 |
|
161 | 161 | ### [Azure CLI](#tab/azure-cli)
|
162 | 162 |
|
163 |
| -1. With the `kubeconfig` file pointing to the `apiserver` of your Kubernetes cluster, create a service account in any namespace (the following command creates it in the default namespace): |
| 163 | +1. With the `kubeconfig` file pointing to the `apiserver` of your Kubernetes cluster, run this command to create a service account. This example creates the service account in the default namespace, but you can substitute any other namespace for `default`. |
164 | 164 |
|
165 | 165 | ```console
|
166 |
| - kubectl create serviceaccount demo-user |
| 166 | + kubectl create serviceaccount demo-user -n default |
167 | 167 | ```
|
168 | 168 |
|
169 |
| -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: |
| 169 | +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). If you used a different namespace in the first command, substitute it here for `default`. |
170 | 170 |
|
171 | 171 | ```console
|
172 | 172 | kubectl create clusterrolebinding demo-user-binding --clusterrole cluster-admin --serviceaccount default:demo-user
|
@@ -198,13 +198,13 @@ Before you begin, review the [conceptual overview of the cluster connect feature
|
198 | 198 |
|
199 | 199 | ### [Azure PowerShell](#tab/azure-powershell)
|
200 | 200 |
|
201 |
| -1. With the `kubeconfig` file pointing to the `apiserver` of your Kubernetes cluster, create a service account in any namespace (the following command creates it in the default namespace): |
| 201 | +1. With the `kubeconfig` file pointing to the `apiserver` of your Kubernetes cluster, run this command to create a service account. This example creates the service account in the default namespace, but you can substitute any other namespace for `default`. |
202 | 202 |
|
203 | 203 | ```console
|
204 |
| - kubectl create serviceaccount demo-user |
| 204 | + kubectl create serviceaccount demo-user -n default |
205 | 205 | ```
|
206 | 206 |
|
207 |
| -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: |
| 207 | +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). If you used a different namespace in the first command, substitute it here for `default`. |
208 | 208 |
|
209 | 209 | ```console
|
210 | 210 | kubectl create clusterrolebinding demo-user-binding --clusterrole cluster-admin --serviceaccount default:demo-user
|
|
0 commit comments