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
*[Azure Arc-enabled Kubernetes system requirements](/azure/azure-arc/kubernetes/system-requirements).
76
+
77
+
### [Tanzu Kubernetes Grid with a Management Cluster](#tab/tkgm)
76
78
79
+
To prepare a TKGm workload cluster, you need:
80
+
81
+
- An Azure subscription with either the Owner role or a combination of Contributor and User Access Administrator roles. You can check your access level by navigating to your subscription, selecting Access control (IAM) on the left-hand side of the Azure portal, and then selecting View my access. If you don't have an Azure subscription, [create one for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F) before you begin.
82
+
83
+
- An Azure resource group. Only one Azure IoT Operations instance is supported per resource group. To create a new resource group, use the [az group create](/cli/azure/group#az-group-create) command. For the list of currently supported Azure regions, see [Supported regions](../overview-iot-operations.md#supported-regions).
84
+
85
+
86
+
```azurecli
87
+
az group create --location <REGION> --resource-group <RESOURCE_GROUP> --subscription <SUBSCRIPTION_ID>
88
+
```
89
+
90
+
- Azure CLI version 2.53.0 or newer installed on your cluster machine. Use `az --version` to check your version and `az upgrade` to update if necessary. For more information, see [How to install the Azure CLI](/cli/azure/install-azure-cli).
91
+
92
+
- The latest version of the **connectedk8s** extension for Azure CLI:
93
+
94
+
95
+
```bash
96
+
az extension add --upgrade --name connectedk8s
97
+
```
98
+
99
+
-[Tanzu Kubernetes Grid with a standalone management cluster.](https://techdocs.broadcom.com/us/en/vmware-tanzu/standalone-components/tanzu-kubernetes-grid/2-5/tkg/mgmt-index.html)
@@ -238,9 +269,101 @@ By default, a Kubernetes cluster is created with a node pool that can run Linux
238
269
239
270
Then, once you have an Azure Arc-enabled Kubernetes cluster, you can [deploy Azure IoT Operations](howto-deploy-iot-operations.md).
240
271
241
-
---
272
+
### [Tanzu Kubernetes Grid with a Management Cluster](#tab/tkgm)
273
+
274
+
To prepare a TKGm workload cluster:
275
+
276
+
1. Create a single-node or multi-node TKGm workload cluster. For guidance, see the [Tanzu documentation](https://techdocs.broadcom.com/us/en/vmware-tanzu/standalone-components/tanzu-kubernetes-grid/2-5/tkg/workload-clusters-index.html).
277
+
278
+
1. SSH to one of the control plane VMs that is created. Once on the control plane VM, run the following:
279
+
280
+
281
+
```bash
282
+
mkdir ~/.kube
283
+
sudo cp /etc/kubernetes/admin.conf ~/.kube/config
284
+
sudo chown <user>:<group>~/.kube/config
285
+
kubectl get pods -A
286
+
```
287
+
288
+
### Arc-enable your cluster
289
+
290
+
Connect your cluster to Azure Arc so that it can be managed remotely.
291
+
292
+
1. On the machine where you deployed the Kubernetes cluster, sign into Azure CLI with your Microsoft Entra user account that has the required role(s) for the Azure subscription:
293
+
294
+
295
+
```azurecli
296
+
az login
297
+
```
298
+
299
+
If at any point you get an error that says *Your device is required to be managed to access your resource*, run `az login` again and make sure that you sign in interactively with a browser.
300
+
301
+
1. After you sign in, the Azure CLI displays all of your subscriptions and indicates your default subscription with an asterisk `*`. To continue with your default subscription, select `Enter`. Otherwise, type the number of the Azure subscription that you want to use.
302
+
303
+
1. Register the required resource providers in your subscription.
304
+
305
+
306
+
```azurecli
307
+
az provider register -n "Microsoft.ExtendedLocation"
308
+
az provider register -n "Microsoft.Kubernetes"
309
+
az provider register -n "Microsoft.KubernetesConfiguration"
310
+
az provider register -n "Microsoft.IoTOperations"
311
+
az provider register -n "Microsoft.DeviceRegistry"
312
+
az provider register -n "Microsoft.SecretSyncController"
313
+
```
314
+
315
+
1. Use the [az connectedk8s connect](/cli/azure/connectedk8s) command to Arc-enable your Kubernetes cluster and manage it as part of your Azure resource group.
To prevent unplanned updates to Azure Arc and the system Arc extensions that Azure IoT Operations uses as dependencies, this command disables autoupgrade. Instead, [manually upgrade agents](/azure/azure-arc/kubernetes/agent-upgrade) as needed.
323
+
324
+
1. Get the cluster's issuer URL.
325
+
326
+
327
+
```azurecli
328
+
az connectedk8s show --resource-group <RESOURCE_GROUP> --name <CLUSTER_NAME> --query oidcIssuerProfile.issuerUrl --output tsv
329
+
```
330
+
331
+
Save the output of this command to use in the next steps.
332
+
333
+
1. SSH to a TKGm management cluster. Edit the custom resource for the workload cluster with the issuer URL from the previous step.
334
+
335
+
336
+
```azurecli
337
+
kubectl edit cluster <CLUSTER_NAME>
338
+
```
339
+
340
+
1. Add the following content to the `config.yaml` file, replacing the <OIDC_ISSUER_URL> placeholder with your cluster's issuer URL.
1. Use the [az connectedk8s enable-features](/cli/azure/connectedk8s) command to enable the custom location feature on your Arc cluster. This command uses the OBJECT_ID environment variable saved from the previous step to set the value for the custom-locations-oid parameter. Run this command on the machine where you deployed the Kubernetes cluster:
Before deploying Azure IoT Operations, you will need to update the Pod Security Admission settings on your TKGm cluster. Applying this file will pre-create namespace labels and set pod security to `privileged`.
360
+
361
+
362
+
```azurecli
363
+
kubectl apply -f <link to repo>
364
+
```
242
365
243
-
## Advanced configuration
366
+
## Advanced Configuration
244
367
245
368
At this point, when you have an Azure Arc-enabled Kubernetes cluster but before you deploy Azure IoT Operations to it, you might want to configure your cluster for advanced scenarios.
0 commit comments