At Ignite 2019, Satya Nadella, CEO of Microsoft, announced an array of new hybrid cloud products and services. The most significant announcement is Azure Arc, the hybrid and multi-cloud platform from Microsoft. With Azure Arc, Microsoft has expanded the support for resources running outside of Azure.
As of today Azure Arc allows you to manage the following resources outside Azure.
- Servers - both physical and virtual machines running Windows or Linux.
- Kubernetes clusters - supporting multiple Kubernetes distributions.
- Azure data services - Azure SQL Managed Instance and PostgreSQL Hyperscale services.
- SQL Server - enroll instances from any location.
Microsoft Azure Arc documentation: https://docs.microsoft.com/en-us/azure/azure-arc/overview
Imp: Azure Arc is not available in all the regions as of today. In some regions it's already GA or in Preview or Not Available at all. So make sure you check Azure Product availability page often https://azure.microsoft.com/en-in/global-infrastructure/services/?products=azure-arc®ions=all
I do not have any K8s cluster running anywhere (not on-premise neither in any other cloud) except one running in Azure, so in this article, I would onboard that AKS cluster into Azure Arc. But the process is same for any kubernetes cluster running in any on-premise/cloud platform.
So, without much theory... let's simply dive! 😉
- Create an AKS cluster in Azure if you do not have it already. A basic cluster setup would do if in case you want to follow along.
- We will issue some CLI commands in this demo. So, it's a good practice to have the latest CLI version installed if not already as old version may not support these commands.
- Azure service principal assigned with the “Contributor” role is also required. So, login to azure from your CLI terminal and get that created. It can be any unique service principal name of your choice.
- Copy the details from the above command and keep it in notepad. We would need these shortly
- Now two namespaces needs to be registered. Microsoft.Kubernetes and Microsoft.KubernetesConfiguration.
- The above commands are asynchronous in nature and hence you need to check their progress by the below commands. The Registration Status must show as "Registered" before you proceed forward.
- Great!... now you have the stage ready. Microsoft provides an az_connect_aks.sh script which can be downloaded from https://github.com/microsoft/azure_arc/blob/main/azure_arc_k8s_jumpstart/aks/arm_template/scripts/az_connect_aks.sh. So, please do that and proceed with the next step
- Replace the appId, password, tenantId with the values you had saved earlier in your notepad. Step 3. For resourceGroup and arcClusterName provide your resource group name and the AKS cluster name respectively
- Save the file and let's open the shell web interface (shell.azure.com) to run this script. Make sure the bash mode is selected
That's it. You have successfully onboarded a kubernetes cluster in Kubernetes - Azure Arc. Now you can centrally monitor your kubernetes clusters running on any cloud, apply policies on those and do Git Operations sitting right in Azure. Isn't that cool stuff.
Congratulations! for coming this far. Hope this article will help you to further explore more on this feature.
Do share with me about your experience and what you have built upon this
foundation. You can take it upto any level and integrate. I would love
to hear from you.
No comments:
Post a Comment