Manage GKE on Azure ARC

What is Azure ARC?

Azure Arc is an Azure offering that simplifies managing complex and distributed environments across on-premises, edge and multi-cloud. Azure Arc delivers three capabilities – managing VMs running outside of Azure, registering and managing Kubernetes clusters deployed within and outside of Azure and running managed data services based on Azure SQL and PostgreSQL Hyperscale in Kubernetes clusters registered with Azure Arc. Currently Azure ARC is in preview.

How to manage GKE on Azure ARC?

Follow the below steps to configure and manage GKE in Azure ARC. For this blog we used a linux machine (jump server) which has connectivity to both GKE in Google cloud and Azure.

  • Use an existing GKE in Google cloud or to test create a new one, if not available

  • Open Azure ARC in Azure Portal

  • Click on “Next : Cluster details”

  • Fill up the details related to Subscription, Resource group, Cluster name and Region and click “Next : Run Script”

  • Login as root in jumpbox and create file “”. this file will be responsible for installing Azure CLI on Linux machine

Content  of “”


    echo "Script to install Azure CLI with YUM package manager"

    echo "Import the Microsoft repository key"
    sudo rpm --import

    echo "Create local azure-cli repository information"
    sudo sh -c 'echo -e "[azure-cli]
    name=Azure CLI
    gpgkey=" > /etc/yum.repos.d/azure-cli.repo'

    echo "Install with the yum install command"
    sudo yum install azure-cli -y

Making file executable

    chmod 755

Execute the file

  • Verify the Azure CLI installation by execute
    az login

Output will be similar to this, and you have to navigate to “”and enter the code displayed

    To sign in, use a web browser to open the page and enter the code ETMY3E9Q9 to authenticate
  • Add extension to Azure CLI
    az extension add --name connectedk8s
    az extension add --name k8sconfiguration
  • Installing helm in the jump server. Helm is a Kubernetes package manager. Create a file

Content of “”


    echo "Downloading the file"
    curl -fsSL -o

    echo "Making executable"
    chmod 700

    echo "Executing"
    sudo sh

Making file executable

    chmod 755

Before executing make sure “/usr/local/bin” is there in PATH variable

    echo $PATH

If “/usr/local/bin”, not available in PATH add it

    export PATH=$PATH:/usr/local/bin

Then execute it

  • Create in jump server, which is downloaded from Azure ARC portal (shown below)

Copy the content of file downloaded from ARC to the file created in jump server


Make it executable

    chmod 755
  • Making “kubeconfig” file in jump server for GKE created in Google Cloud. This activity is done since will try to connect the Google CLoud GKE cluster via helm
    gcloud container clusters get-credentials gcp-gke --zone us-central1-c --project devops-273723

here gcp-gke is the GKE cluster in Google cloud.

Verify the cluster added and make sure the cluster added is current context by (an * mark will be there in front)

    kubectl config get-contexts
  • Execute

it might take couple of minute to complete the execution.

  • Once completed go to back to Azure portal and click on ”Verification” and click on “Go to cluster”

Now the GKE cluster is visible and manageable via Azure.

2 thoughts on “Manage GKE on Azure ARC”

Leave a Reply

Your email address will not be published. Required fields are marked *