Connect to Arc
Connect clusters to Azure Arc.
Persona: Cluster Administrator
You want to add Azure Arc to a number of clusters to give a centralised management approach for tagging and deployment of resources.
It is important to consider
- how you want to organise your management groups, subscriptions and resource groups
- which tags (and values) should be in use to help organisation
- appropriate role-based access control (RBAC)
Azure Arc for Kubernetes is based upon the CNCF incubation project Flux (version 1) by Weaveworks.
An agent runs within your cluster and reconciles desired vs actual state.
You will need several key components in order to connect your cluster to Azure Arc.
- Access to the Azure CLI
- Access to your Kubernetes cluster(s)
- The correct extensions and providers registered in your Azure subscription
Connect Kubernetes clusters to Azure Arc:
Create a resource group,
arc4k8sin West Europe
Add the kubernetes clusters as Azure Arc-enabled Kubernetes clusters, also in West Europe
Add a city tag for each, e.g.
city=Dublinfor the cluster in northeurope
City Region code London uksouth Dublin northeurope Amsterdam westeurope
Hint: Look at the options available on
az connectedk8sfor specifying config and tags. Hint'2: If the pods in the azure-arc namespace have a status of ImagePullBackOff then this is usually down to VM resources. Try restarting the server, or resizing to a D8s v3.
When connected to Arc, what information can you get from the Resource Graph?
It may take some time for the additional Azure Arc metadata to appear
Create a Resource Graph query in Azure for your unmanaged cluster estate showing useful information by querying the Resource Graph
resources | where type == 'microsoft.kubernetes/connectedclusters'
Discussion Points 💬
How would you automate onboarding of clusters to Arc?
How would that work if there are different groups of people for the Azure admins and the on-prem Kubernetes clusters admins?
What is the required role to onboard an Azure Arc-enabled Kubernetes cluster?
- Add the KQL query to an Azure Workbook
- Automate the onboarding process
- Azure Arc-enabled Kubernetes resources exist in Azure Resource Manager
- Cluster metadata appears on the Azure Arc enabled Kubernetes resource as metadata, e.g.
- Kubernetes version
- Total node count
- Modified Resource Graph KQL query to project
- cluster name
- distribution type
- kubernetes version
- node count
- the value for the city tag
- Accessing a Kubernetes cluster
- Connect an existing Kubernetes cluster to Azure Arc
- Flux concepts
- Azure Resource Graph
- Resource Graph Queries
- Understanding the Azure Resource Graph query language
- KQL quick reference
- Azure Monitor Workbooks
Help us improve
Azure Citadel is a community site built on GitHub, please contribute and send a pull requestMake a change