π Azure Arc¶
πΉ What is Azure Arc?¶
Azure Arc is a bridge that extends Azure management and services to on-premises, multi-cloud, and edge environments.
Key Benefits:¶
-
Centralized governance and compliance
-
Azure services (like Azure Monitor, Policy, Defender) on non-Azure resources
-
Kubernetes and server management outside Azure
-
Enables GitOps with Azure Kubernetes Service (AKS)
π§© Components of Azure Arc¶
| Component | Description |
|---|---|
| Arc-enabled Servers | Manage Windows/Linux machines outside Azure |
| Arc-enabled Kubernetes | Manage k8s clusters on-premises or other clouds |
| Arc-enabled SQL Server | Run Azure data services on-prem or multi-cloud |
| Azure Arc Data Services | Deploy Azure SQL MI and PostgreSQL Hyperscale anywhere |
π§° Prerequisites¶
-
Azure subscription
-
Azure CLI installed
-
Azure Arc extension:
-
For Kubernetes:
π₯οΈ Arc-enabled Servers Setup (Linux Example)¶
1. Register resource provider¶
az provider register --namespace 'Microsoft.HybridCompute'
az provider register --namespace 'Microsoft.GuestConfiguration'
2. Create a Resource Group¶
3. Download and install the agent¶
wget https://aka.ms/azcmagent
chmod +x azcmagent
sudo ./azcmagent connect \
--resource-group Arc-Infra \
--tenant-id <your-tenant-id> \
--location eastus \
--subscription-id <your-subscription-id> \
--resource-name my-linux \
--tags "env=dev" "os=linux"
To check:
βΈοΈ Arc-enabled Kubernetes Cluster¶
1. Connect a Kubernetes cluster to Azure Arc¶
Install kubectl, helm, and ensure kubeconfig is set.
Verify connection:
2. Enable GitOps (optional)¶
az k8s-configuration flux create \
--cluster-name arc-k8s-cluster \
--resource-group Arc-Infra \
--cluster-type connectedClusters \
--name arc-gitops-config \
--scope cluster \
--namespace default \
--url https://github.com/<your-repo> \
--branch main \
--sync-interval 60s \
--kustomization name=infra path=./manifests prune=true
π¦ Arc with Terraform¶
Example: Register an Arc-enabled server (requires agent pre-installed)¶
provider "azurerm" {
features {}
}
resource "azurerm_resource_group" "arc" {
name = "Arc-Infra"
location = "East US"
}
For Kubernetes, use the AzureRM provider with extensions (still better for AKS).
π Azure Policy with Arc¶
You can apply policies to non-Azure resources:
az policy assignment create \
--name "audit-linux-password" \
--policy "EnableLinuxPasswordAudit" \
--scope "/subscriptions/<sub-id>/resourceGroups/Arc-Infra"
View compliance in Azure Policy dashboard.
π Monitoring Arc-enabled Resources¶
-
Azure Monitor Agent
-
Install on Arc server to collect metrics/logs.
-
Use
Log Analyticsworkspace.
-
-
Azure Defender for Servers
- Works on Arc machines with agent.
-
Kubernetes Monitoring
-
Enable Insights:
-
βοΈ YAML Example for GitOps via Flux v2¶
apiVersion: source.toolkit.fluxcd.io/v1beta1
kind: GitRepository
metadata:
name: infra-repo
namespace: flux-system
spec:
interval: 1m
url: https://github.com/your-org/infra
branch: main
---
apiVersion: kustomize.toolkit.fluxcd.io/v1beta1
kind: Kustomization
metadata:
name: infra-kustomize
namespace: flux-system
spec:
interval: 5m
path: "./"
prune: true
sourceRef:
kind: GitRepository
name: infra-repo
π Use Cases of Azure Arc¶
| Use Case | Description |
|---|---|
| Hybrid cloud management | Manage on-prem, AWS, GCP resources in Azure |
| Policy enforcement | Apply Azure policies to any infrastructure |
| DevOps with GitOps | Git-based deployments for any K8s clusters |
| Run Azure SQL Anywhere | Azure SQL MI in disconnected or edge environments |
| Monitoring and Security | Use Defender and Monitor on Arc-connected systems |
π Azure Arc vs AWS Control Tower¶
| Feature / Area | Azure Arc | AWS Control Tower |
|---|---|---|
| Primary Focus | Manage and govern non-Azure resources (on-prem, multi-cloud) | Govern multi-account AWS environments |
| Scope | Hybrid & multi-cloud (Linux/Windows servers, K8s clusters, SQL DBs) | AWS-only (multi-account landing zones, guardrails, governance) |
| Cross-cloud/On-prem support | β Yes β for VMs, K8s, SQL in AWS, GCP, on-prem, edge | β No β only AWS accounts and regions |
| Multi-account setup | β Not designed for managing Azure subscriptions/accounts | β Yes β automates account setup, SCPs, org units |
| Governance & Policy | β Azure Policy across hybrid and multi-cloud resources | β Service Control Policies (SCPs), AWS Config, AWS Organizations |
| Monitoring | β Azure Monitor, Defender for Cloud on Arc-connected systems | β CloudWatch + AWS Config (only for AWS resources) |
| Security & Compliance | β Defender for Cloud (hybrid) | β Preconfigured Guardrails (via SCPs, AWS Config rules) |
| GitOps & K8s Integration | β FluxCD GitOps + K8s management (Arc-enabled K8s) | β No GitOps; only works with AWS-native services |
| Custom Locations / vCenter | β Supports vCenter, Azure Stack, bare-metal servers | β Not supported |
| Agent-based Resource Management | β Agent installs on VMs to onboard them to Azure | β N/A β AWS-native accounts only |
π Summary Table¶
| Category | Azure Arc | AWS Control Tower | Winner |
|---|---|---|---|
| Hybrid/multi-cloud | β Yes | β No | π Azure Arc |
| Multi-account AWS Mgmt | β No | β Yes | π AWS Control Tower |
| GitOps/K8s Integration | β Full support | β None | π Azure Arc |
| Policy Compliance | β Azure Policy on all environments | β AWS Config & SCPs | π― Tie |
| Monitoring/Security | β Defender for Cloud + Log Analytics | β CloudWatch + GuardDuty | π― Tie |
π§ Real-World Use Case Comparison¶
| Scenario | Use Azure Arc? | Use AWS Control Tower? |
|---|---|---|
| Manage Linux VMs on-prem and in GCP | β Yes | β No |
| Manage all AWS accounts under one policy/compliance model | β No | β Yes |
| Connect EKS cluster to Azure Monitor and GitOps pipeline | β Yes | β No |
| Enforce governance on Azure, AWS, and edge Kubernetes clusters | β Yes | β No |
| Provision new AWS accounts with baseline guardrails | β No | β Yes |
π TL;DR¶
| Service | What it Does Best |
|---|---|
| Azure Arc | Manages non-Azure servers, Kubernetes, SQL, hybrid infra |
| AWS Control Tower | Manages multiple AWS accounts with governance, SCPs, guardrails |
π§ Think of it this way:
-
Azure Arc = "Manage any infrastructure from Azure"
-
AWS Control Tower = "Govern many AWS accounts with best practices"