Skip to content

Commit 8d69cde

Browse files
Merge pull request #235092 from JnHs/jh-arck8-ccns
update namespace details on service account command
2 parents 2a2c4a8 + 770f3fe commit 8d69cde

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

articles/azure-arc/kubernetes/cluster-connect.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
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
44
ms.topic: how-to
55
ms.custom: devx-track-azurecli
66
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
160160
161161
### [Azure CLI](#tab/azure-cli)
162162
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`.
164164
165165
```console
166-
kubectl create serviceaccount demo-user
166+
kubectl create serviceaccount demo-user -n default
167167
```
168168

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`.
170170

171171
```console
172172
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
198198

199199
### [Azure PowerShell](#tab/azure-powershell)
200200

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`.
202202

203203
```console
204-
kubectl create serviceaccount demo-user
204+
kubectl create serviceaccount demo-user -n default
205205
```
206206

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`.
208208

209209
```console
210210
kubectl create clusterrolebinding demo-user-binding --clusterrole cluster-admin --serviceaccount default:demo-user

0 commit comments

Comments
 (0)