Azure Arc was released a while ago, but got a great update in May 2021 during the annual Build conference allowing it to run Azure Application services across your Azure Arc enabled Kubernetes services.
In this article, I will explain how you can get started with Azure Arc. As Prerequisites I created the following on each cloud provider and on-premise infrastructure.
- Kubernetes (AKS)
- Google GCP
- Kubernetes (GKE)
- On-Premises (VMWare)
- 3-Server Nodes combined to Kubernetes through K3S (see this article on how you can set this up)
To summarize Azure Arc in my own words: "it's a management plane for your Kubernetes Clusters and Phyiscal servers that allows you to manage your machines no matter where they sit".
In Azure terms: "Azure Arc offers simplified management, faster app development, and consistent Azure services. Easily organize, govern, and secure Windows, Linux, SQL Server and Kubernetes clusters across data centers, the edge, and multicloud environments right from Azure."
Personally, I find this an amazing tool with a low cost to manage your entire datacenter and cloud estate!
Creating an Azure Arc connected Cloud
So let's get started and create our clusters and servers! Each cloud has their own specificalities, but I would love to show you how you can create them on each one of them. The overall process is quite similar:
- Login an configure the Azure Arc agent
- Fetch the kubectl access
- Configure Azure Arc with
Azure Arc Connect Server
To connect a server, we navigate to Azure Arc in the Azure Portal
In there we can click on Servers which will open up the overview of our servers. On the Left top we can now click "add" to add a server.
Seeing that the process is quite similar, I won't go into detail of how you should do this for the different cloud providers. To connect your server, open op the "Add" page and navigate through the steps while selecting your resource group operating system.
Once you have done that you need to install the agent. In our case I was running Linux as an operating system. At this step we will now see the commands we should run to get Arc up and running
💡 Do not forget to switch to root with
Congratulations 🎉 you have now connected your server to Azure Arc!
Azure Arc Connect Kubernetes
We already have single servers configured, but how can we configure our Kubernetes clusters? Well this is a bit more tricky. For this we can follow these steps:
- Install Kubernetes (managed with AKS or GKE or through k3s for example)
- Install & Configure Kubectl
- Install Helm
- Run AZ CLI
💡 You can make things easier (as I did) by utilizing the Azure Cloud Shell and configure
kubectlin it. If you are working with GKE, just copy the
~/.kube/configfile content from GKE to Azure Cloud Shell and you can run
kubectl get pods -Ain your Azure Cloud Shell to connect to your GKE Kubernetes 😉
Showing this example on GKE (as Azure is straightforward with the shell), let's open up the Kubernetes pane and click "Add" again. We will now have to enter the subscription again, plus a cluster name (metadata) to name it.
Now we will be presented by the commands we need to execute to connect this Kubernetes cluster. Again, remember to have kubectl configured to connect to your cluster, then everything should be going smoothly!
As explained before, I opened up the Kubectl configuration and copied the GKE config towards the Azure Cloud Shell one (to skip installation of AZ CLI on GCP):
Once this has been pasted I verify to ensure
kubectl get pods -A is working and showing my GKE pods.
Since that has been verified, I am now able to run the required commands and get cluster configured to Azure Arc.
We are now connected to Azure Arc, but let's for fun check on GKE to see our pods running (including the Azure Arc pods) in the Google Cloud Shell:
Looking at our final overview, this is what we have created, a beautiful server park consisting out of our Kubernetes clusters and Servers!
In this article I went in more details on how you can get started with Azure Arc and connect your existing Servers and Kubernetes clusters, no matter where they are running!