In the previous post in this series I talked about why Azure Arc is also interesting for developers. Today we finally move on to the more practical part and try to get it up and running on our local machine.
Let’s first focus on what you need to have up and running on your local machine first:
-
Make sure your kubeconfig file is configured properly and you are working against your k8s cluster context.
-
Install Helm 3. If you are on a Windows environment, a recommended and easy way is to use the Helm 3 Chocolatey package.
As we want to run Azure Arc on our local machine, we also need to have a local AKS cluster up and running. You can use Minikube, MicroK8S, KIND (Kubernetes in Docker), or any other flavor you like that can be installed locally. I tested both in MiniKube and KIND.
Now we can move on to the Azure side. Let’s see what we need there:
- An active Azure subscription
Register resource providers
Now we need to register 3 extra resource providers in our Azure subscription before we can use Azure Arc-enabled Kubernetes:
az provider register --namespace Microsoft.Kubernetes
az provider register --namespace Microsoft.KubernetesConfiguration
az provider register --namespace Microsoft.ExtendedLocation
Remark: Registration is an asynchronous process, and may take approximately 10 minutes.
You can monitor the registration process with the following commands:
az provider show -n Microsoft.Kubernetes -o table
az provider show -n Microsoft.KubernetesConfiguration -o table
az provider show -n Microsoft.ExtendedLocation -o table
You can also enable this through the Azure Portal:
Go to Subscriptions. Select the correct subscription.
Click on Resource providers. Enter the name of the resource provider in the filter box. Select the Resource Provider and click on Register.
Install CLI extensions
We also need some extensions installed for the Azure CLI:
az extension add --upgrade --yes --name connectedk8s
az extension add --upgrade --yes --name k8s-extension
az extension add --upgrade --yes --name customlocation
Remark: Make sure you have the latest version of both the CLI and the extensions installed.