Deploy a local Kubernetes Cluster using kind and connect it to Azure Arc

The following Jumpstart scenario will guide you on how to use kind to run a Kubernetes cluster locally and connect it as an Azure Arc-enabled Kubernetes cluster resource.


  • Clone the Azure Arc Jumpstart repository

    git clone
  • Install or update Azure CLI to version 2.36.0 and above. Use the below command to check your current installed version.

    az --version
  • Install and Set Up kubectl

  • Install Helm 3

  • Kind leverages Docker to run the Kubernetes nodes. You will need to install Docker locally:

  • Install the Go programming language.

  • Create Azure service principal (SP)

    The Azure service principal assigned with the “Contributor” role is required to complete the scenario and its related automation. To create it, log in to your Azure account run the below command (you could also do this in Azure Cloud Shell).

    az login
    subscriptionId=$(az account show --query id --output tsv)
    az ad sp create-for-rbac -n "<Unique SP Name>" --role "Contributor" --scopes /subscriptions/$subscriptionId

    For example:

    az login
    subscriptionId=$(az account show --query id --output tsv)
    az ad sp create-for-rbac -n "JumpstartArcK8s" --role "Contributor" --scopes /subscriptions/$subscriptionId

    Output should look like this:

    "displayName": "JumpstartArcK8s",

    NOTE: If you create multiple subsequent role assignments on the same service principal, your client secret (password) will be destroyed and recreated each time. Therefore, make sure you grab the correct password.

    NOTE: The Jumpstart scenarios are designed with as much ease of use in-mind and adhering to security-related best practices whenever possible. It is optional but highly recommended to scope the service principal to a specific Azure subscription and resource group as well considering using a less privileged service principal account

  • Enable subscription with the two resource providers for Azure Arc-enabled Kubernetes. Registration is an asynchronous process, and registration may take approximately 10 minutes.

    az provider register --namespace Microsoft.Kubernetes
    az provider register --namespace Microsoft.KubernetesConfiguration
    az provider register --namespace Microsoft.ExtendedLocation

    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
  • Install the Azure Arc for Kubernetes CLI extensions connectedk8s and k8s-configuration:

    az extension add --name connectedk8s
    az extension add --name k8s-configuration

    NOTE: If you already used this guide before and/or have the extensions installed, use the below commands:

    az extension update --name connectedk8s
    az extension update --name k8s-configuration


  • Install kind

    On Linux:

    curl -Lo ./kind
    chmod +x ./kind
    sudo mv ./kind /usr/local/bin/kind

    On MacOS:

    brew install kind

    On Windows:

    choco install kind
    • Navigate to the folder that has the kind cluster definition.
    cd azure_arc/azure_arc_k8s_jumpstart/kind
    • Create the kind cluster. We are using a configuration file called kind_cluster.yaml to specify our cluster configuration. This will create a 3 node cluster, with 1 master node and 2 worker nodes.
    kind create cluster --config kind_cluster.yaml --name arc-cluster

    kind create cluster

    NOTE: By default, kind will store the kubeconfig file used to connect to your cluster in the ~/.kube directory. If you want to use a custom directory to store the kubeconfig file, use the --kube-config flag.

    If you chose a specific location for the cluster’s kubeconfig file, make sure you export its location as an environment variable using the export KUBECONFIG=/path/to/kubeconfig location or in Windows, add this location to your PATH.

  • Verify that kind has created the cluster successfully, and you can access the cluster using kubectl.

    kubectl get nodes

    kubectl get nodes

Connecting to Azure Arc

  • Now that you have a running kind cluster let’s connect the kind cluster to Azure Arc.

    az login --service-principal -u mySpnClientId -p mySpnClientSecret --tenant myTenantID
  • Create a resource group

    az group create --name Arc-kind-Demo -l EastUS -o table

    Note: Before deploying, make sure to check the Azure Arc-enabled Kubernetes region availability page.

    Create Azure resource group

  • Deploy the Arc binaries using Azure CLI:

    az connectedk8s connect -n Arc-kind-Demo -g Arc-kind-Demo --tags 'Project=jumpstart_azure_arc_k8s' --correlation-id "d009f5dd-dba8-4ac7-bac9-b54ef3a6671a"
  • Upon completion, you will have your kind cluster connected as a new Azure Arc Kubernetes cluster resource in a new resource group.

    New Azure Arc-enabled Kubernetes cluster

    New Azure Arc-enabled Kubernetes cluster

    New Azure Arc-enabled Kubernetes cluster

Delete the deployment

  • In Azure, the most straightforward way is to delete the cluster or the resource group via the Azure Portal or through the CLI.

    az group delete --name Arc-kind-Demo

    Delete the Azure Arc-enabled Kubernetes cluster

    Delete Azure resource group

  • To delete the kind cluster locally, use the following command:

    kind delete cluster --name arc-cluster

    kind delete cluster