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
title: "Create and manage custom locations on Azure Arc-enabled Kubernetes"
3
3
services: azure-arc
4
4
ms.service: azure-arc
5
-
ms.date: 05/25/2021
5
+
ms.date: 10/19/2021
6
6
ms.topic: article
7
7
author: shashankbarsin
8
8
ms.author: shasb
@@ -12,19 +12,15 @@ description: "Use custom locations to deploy Azure PaaS services on Azure Arc-en
12
12
13
13
# Create and manage custom locations on Azure Arc-enabled Kubernetes
14
14
15
-
As an Azure location extension, *Custom Locations* provides a way for tenant administrators to use their Azure Arc-enabled Kubernetes clusters as target locations for deploying Azure services instances. Azure resources examples include Azure Arc-enabled SQL Managed Instance and Azure Arc-enabled PostgreSQL Hyperscale.
16
-
17
-
Similar to Azure locations, end users within the tenant with access to Custom Locations can deploy resources there using their company's private compute.
15
+
*Custom Locations* provides a way for tenant or cluster administrators to configure their Azure Arc-enabled Kubernetes clusters as target locations for deploying Azure services instances i.e resources like Azure Arc-enabled SQL Managed Instance and Azure Arc-enabled PostgreSQL Hyperscale. On Azure Arc-enabled Kubernetes clusters, custom location represents an abstraction of a namespace within the Azure Arc-enabled Kubernetes cluster. Tenant or cluster administrators can assign Role-based access control (RBAC) permissions to application developers or database admins to deploy resources like Azure Arc-enabled SQL Managed Instances, Azure Arc-enabled PostgreSQL Hyperscale instances or Azure web apps on the custom location.
16
+
17
+
A conceptual overview of this feature is available in [Custom locations - Azure Arc-enabled Kubernetes](conceptual-custom-locations.md) article.
18
18
19
19
In this article, you learn how to:
20
20
> [!div class="checklist"]
21
21
> * Enable custom locations on your Azure Arc-enabled Kubernetes cluster.
22
-
> * Deploy the Azure service cluster extension of the Azure service instance on your cluster.
23
-
> * Create a custom location on your Azure Arc-enabled Kubernetes cluster.
24
-
25
-
A conceptual overview of this feature is available in [Custom locations - Azure Arc-enabled Kubernetes](conceptual-custom-locations.md) article.
22
+
> * Create a custom location.
26
23
27
-
[!INCLUDE [preview features note](./includes/preview/preview-callout.md)]
28
24
29
25
## Prerequisites
30
26
@@ -48,6 +44,8 @@ A conceptual overview of this feature is available in [Custom locations - Azure
48
44
az extension update --name k8s-extension
49
45
az extension update --name customlocation
50
46
```
47
+
>[!NOTE]
48
+
>We recommend using the latest version of the CLI extensions to get latest features.
51
49
52
50
- Verify completed provider registration for `Microsoft.ExtendedLocation`.
53
51
1. Enter the following commands:
@@ -95,7 +93,7 @@ If you are logged into Azure CLI using a service principal, to enable this featu
95
93
96
94
## Create custom location
97
95
98
-
1. Deploy the Azure service cluster extension of the Azure service instance you eventually want on your cluster:
96
+
1. Deploy the Azure service cluster extension of the Azure service instance you intent to install on your cluster:
99
97
100
98
* [Azure Arc-enabled Data Services](../data/create-data-controller-direct-cli.md#create-the-arc-data-services-extension)
101
99
@@ -107,27 +105,130 @@ If you are logged into Azure CLI using a service principal, to enable this featu
107
105
108
106
* [Event Grid on Kubernetes](../../event-grid/kubernetes/install-k8s-extension.md)
109
107
110
-
1. Get the Azure Resource Manager identifier of the Azure Arc-enabled Kubernetes cluster, referenced in later steps as `connectedClusterId`:
108
+
2. Get the Azure Resource Manager identifier of the Azure Arc-enabled Kubernetes cluster, referenced in later steps as `connectedClusterId`:
111
109
112
110
```azurecli
113
111
az connectedk8s show -n <clusterName> -g <resourceGroupName> --query id -o tsv
114
112
```
115
113
116
-
1. Get the Azure Resource Manager identifier of the cluster extension deployed on top of Azure Arc-enabled Kubernetes cluster, referenced in later steps as `extensionId`:
114
+
3. Get the Azure Resource Manager identifier of the cluster extension deployed on top of Azure Arc-enabled Kubernetes cluster, referenced in later steps as `extensionId`:
117
115
118
116
```azurecli
119
117
az k8s-extension show --name <extensionInstanceName> --cluster-type connectedClusters -c <clusterName> -g <resourceGroupName> --query id -o tsv
120
118
```
121
119
122
-
1. Create custom location by referencing the Azure Arc-enabled Kubernetes cluster and the extension:
120
+
4. Create custom location by referencing the Azure Arc-enabled Kubernetes cluster and the extension:
az customlocation create -n <customLocationName> -g <resourceGroupName> --namespace <name of namespace> --host-resource-id <connectedClusterId> --cluster-extension-ids <extensionIds>
126
124
```
127
125
126
+
**Required parameters**
127
+
128
+
| Parameter name | Description |
129
+
|----------------|------------|
130
+
| `--name, --n` | Name of the custom location |
131
+
| `--resource-group, --g` | Resource group of the custom location |
132
+
| `--namespace` | Namespace in the cluster bound to the the custom location being created |
133
+
| `--host-resource-id` | Azure Resource Manager identifier of the Azure Arc-enabled Kubernetes cluster (connected cluster) |
134
+
| `--cluster-extension-ids` | Azure Resource Manager identifiers of the cluster extension instances installed on the connected cluster. Provide a space-seperated list of the cluster extension ids |
135
+
136
+
**Optional parameters**
137
+
138
+
| Parameter name | Description |
139
+
|--------------|------------|
140
+
| `--assign-identity` | Default is `None`. Creates a [system-assigned managed identity](https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/overview) if parameter is set to "SystemAssigned" |
141
+
| `--location, --l` | Location of the custom location Azure Resource Manager resource in Azure. By default, this will be set to the location (or Azure region) of the connected cluster |
142
+
| `--tags` | Space-separated list of tags: key[=value] [key[=value] ...]. Use '' to clear existing tags |
143
+
| `--kubeconfig` | Admin Kubeconfig of Cluster. Needs to passed in as a file if the cluster is a non-AAD enabled cluster |
144
+
145
+
146
+
## Show details of a custom location
147
+
148
+
Show details of a custom location
149
+
150
+
```azurecli
151
+
az customlocation show -n <customLocationName> -g <resourceGroupName>
152
+
```
153
+
154
+
**Required parameters**
155
+
156
+
| Parameter name | Description |
157
+
|----------------|------------|
158
+
|`--name, --n`| Name of the custom location |
159
+
|`--resource-group, --g`| Resource group of the custom location |
160
+
161
+
## List custom locations
162
+
163
+
Lists all custom locations in a resource group
164
+
165
+
```azurecli
166
+
az customlocation show -g <resourceGroupName>
167
+
```
168
+
169
+
**Required parameters**
170
+
171
+
| Parameter name | Description |
172
+
|----------------|------------|
173
+
|`--resource-group, --g`| Resource group of the custom location |
174
+
175
+
176
+
## Update a custom location
177
+
178
+
Use `update` command when you want to add new tags, associate new cluster extension IDs to the custom location while retaining existing tags and associated cluster extensions. `--cluster-extension-ids`, `--tags`, `assign-identity` can be updated.
179
+
180
+
```azurecli
181
+
az customlocation update -n <customLocationName> -g <resourceGroupName> --namespace <name of namespace> --host-resource-id <connectedClusterId> --cluster-extension-ids <extensionIds>
182
+
```
183
+
**Required parameters**
184
+
185
+
| Parameter name | Description |
186
+
|----------------|------------|
187
+
|`--name, --n`| Name of the custom location |
188
+
|`--resource-group, --g`| Resource group of the custom location |
189
+
|`--namespace`| Namespace in the cluster bound to the the custom location being created |
190
+
|`--host-resource-id`| Azure Resource Manager identifier of the Azure Arc-enabled Kubernetes cluster (connected cluster) |
191
+
192
+
**Optional parameters**
193
+
194
+
| Parameter name | Description |
195
+
|--------------|------------|
196
+
|`--assign-identity`| Can be updated to either `None` or `"SystemAssigned` if you want to assign a [system-assigned managed identity](https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/overview) to the custom location |
197
+
|`--cluster-extension-ids`| Associate new cluster extensions to this custom location by providing Azure Resource Manager identifiers of the cluster extension instances installed on the connected cluster. Provide a space-seperated list of the cluster extension ids |
198
+
|`--tags`| Add new tags in addition to existing tags.Space-separated list of tags: key[=value][key[=value] ...]. |
199
+
200
+
## Patch a custom location
201
+
202
+
Use `patch` command when you want to replace existing tags, cluster extension IDs with new tags, cluster extension IDs. `--cluster-extension-ids`, `assign-identity`, `--tags` can be patched.
203
+
204
+
```azurecli
205
+
az customlocation patch -n <customLocationName> -g <resourceGroupName> --namespace <name of namespace> --host-resource-id <connectedClusterId> --cluster-extension-ids <extensionIds>
206
+
```
207
+
208
+
**Required parameters**
209
+
210
+
| Parameter name | Description |
211
+
|----------------|------------|
212
+
|`--name, --n`| Name of the custom location |
213
+
|`--resource-group, --g`| Resource group of the custom location |
214
+
215
+
**Optional parameters**
216
+
217
+
| Parameter name | Description |
218
+
|--------------|------------|
219
+
|`--assign-identity`| Can be updated to either `None` or `"SystemAssigned` if you want to assign a [system-assigned managed identity](https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/overview) to the custom location |
220
+
|`--cluster-extension-ids`| Associate new cluster extensions to this custom location by providing Azure Resource Manager identifiers of the cluster extension instances installed on the connected cluster. Provide a space-seperated list of the cluster extension IDs |
221
+
|`--tags`| Add new tags in addition to existing tags.Space-separated list of tags: key[=value][key[=value] ...]. |
222
+
223
+
## Delete a custom location
224
+
225
+
```azurecli
226
+
az customlocation delete -n <customLocationName> -g <resourceGroupName> --namespace <name of namespace> --host-resource-id <connectedClusterId> --cluster-extension-ids <extensionIds>
227
+
```
228
+
128
229
## Next steps
129
230
130
231
- Securely connect to the cluster using [Cluster Connect](cluster-connect.md).
131
232
- Continue with [Azure App Service on Azure Arc](../../app-service/overview-arc-integration.md) for end-to-end instructions on installing extensions, creating custom locations, and creating the App Service Kubernetes environment.
132
-
- Create an Event Grid topic and an event subscription for [Event Grid on Kubernetes](../../event-grid/kubernetes/overview.md).
233
+
- Create an event grid topic and an event subscription for [Event Grid on Kubernetes](../../event-grid/kubernetes/overview.md).
133
234
- Learn more about currently available [Azure Arc-enabled Kubernetes extensions](extensions.md#currently-available-extensions).
0 commit comments