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: articles/azure-arc/kubernetes/cluster-connect.md
+25-32Lines changed: 25 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,26 +23,20 @@ A conceptual overview of this feature is available in [Cluster connect - Azure A
23
23
24
24
- Install the `connectedk8s` Azure CLI extension of version >= 1.1.0:
25
25
26
-
```azurecli
26
+
```console
27
27
az extension add --name connectedk8s
28
28
```
29
29
30
30
If you've already installed the `connectedk8s` extension, update the extension to the latest version:
31
31
32
-
```azurecli
32
+
```console
33
33
az extension update --name connectedk8s
34
34
```
35
35
36
36
- An existing Azure Arc-enabled Kubernetes connected cluster.
37
37
- If you haven't connected a cluster yet, use our [quickstart](quickstart-connect-cluster.md).
38
38
- [Upgrade your agents](agent-upgrade.md#manually-upgrade-agents) to version >= 1.1.0.
39
39
40
-
- Enable the Cluster Connect on any Azure Arc-enabled Kubernetes cluster by running the following command on a machine where the `kubeconfig` file is pointed to the cluster of concern:
41
-
42
-
```azurecli
43
-
az connectedk8s enable-features --features cluster-connect -n <clusterName> -g <resourceGroupName>
44
-
```
45
-
46
40
- Enable the below endpoints for outbound access in addition to the ones mentioned under [connecting a Kubernetes cluster to Azure Arc](quickstart-connect-cluster.md#meet-network-requirements):
47
41
48
42
| Endpoint | Port |
@@ -58,45 +52,44 @@ A conceptual overview of this feature is available in [Cluster connect - Azure A
58
52
ARM_ID_CLUSTER=$(az connectedk8s show -n $CLUSTER_NAME -g $RESOURCE_GROUP --query id -o tsv)
59
53
```
60
54
55
+
61
56
## Enable Cluster Connect feature
62
57
63
58
You can enable the Cluster Connect on any Azure Arc-enabled Kubernetes cluster by running the following command on a machine where the `kubeconfig` file is pointed to the cluster of concern:
64
59
65
-
```azurecli
60
+
```console
66
61
az connectedk8s enable-features --features cluster-connect -n $CLUSTER_NAME -g $RESOURCE_GROUP
67
62
```
68
63
69
64
## Azure Active Directory authentication option
70
65
71
-
1.With the `kubeconfig` file pointing to the `apiserver` of your Kubernetes cluster, create a ClusterRoleBinding or RoleBinding to the Azure AD entity (service principal or user) requiring access:
66
+
1.Get the `objectId` associated with your Azure AD entity:
72
67
73
-
1. Get the `objectId` associated with your Azure AD entity:
68
+
- For Azure AD user account:
74
69
75
-
- For Azure AD user account:
76
-
77
-
```console
78
-
AAD_ENTITY_OBJECT_ID=$(az ad signed-in-user show --query objectId -o tsv)
79
-
```
70
+
```console
71
+
AAD_ENTITY_OBJECT_ID=$(az ad signed-in-user show --query objectId -o tsv)
72
+
```
80
73
81
-
- For Azure AD application:
74
+
- For Azure AD application:
82
75
83
-
```console
84
-
AAD_ENTITY_OBJECT_ID=$(az ad sp show --id <id> --query objectId -o tsv)
85
-
```
76
+
```console
77
+
AAD_ENTITY_OBJECT_ID=$(az ad sp show --id <id> --query objectId -o tsv)
78
+
```
86
79
87
-
1. Authorize the AAD entity with appropriate permissions:
80
+
1. Authorize the AAD entity with appropriate permissions:
88
81
89
-
- If you are using Kubernetes native ClusterRoleBinding or RoleBinding for authorization checks on the cluster, you can create one mapped to the Azure AD entity (service principal or user) that needs to access this cluster. Example:
- If you are using Kubernetes native ClusterRoleBinding or RoleBinding for authorization checks on the cluster, with the `kubeconfig` file pointing to the `apiserver` of your cluster for direct access, you can create one mapped to the Azure AD entity (service principal or user) that needs to access this cluster. Example:
- If using Azure Active Directory authentication option, after logging into Azure CLI using the Azure AD entity of interest, get the Cluster Connect `kubeconfig` needed to communicate with the cluster from anywhere (from even outside the firewall surrounding the cluster):
130
123
131
-
```azurecli
124
+
```console
132
125
az connectedk8s proxy -n $CLUSTER_NAME -g $RESOURCE_GROUP
133
126
```
134
127
135
128
- If using the service account authentication option, get the Cluster Connect `kubeconfig` needed to communicate with the cluster from anywhere:
136
129
137
-
```azurecli
130
+
```console
138
131
az connectedk8s proxy -n $CLUSTER_NAME -g $RESOURCE_GROUP --token $TOKEN
0 commit comments