Skip to content
Tutorials Center
My learning

Topics

Lesson 48 of 57 ยท Architecture and Reliability

Azure Arc, Lighthouse and Hybrid Management

Manage servers and Kubernetes outside Azure with Azure Arc, and manage customer tenants with Azure Lighthouse: agents, delegated roles, policy, Defender and lift-and-shift paths.

Real organizations rarely live entirely in one cloud. They have servers in an office or datacenter, virtual machines in other clouds, Kubernetes clusters at factories and, if they are service providers, dozens of customers with their own Azure tenants. Two Azure services reduce the pain of that sprawl without moving anything: Azure Arc extends Azure management to resources that run outside Azure, and Azure Lighthouse lets one organization manage another organization's Azure resources without sharing passwords or creating guest accounts.

This lesson explains both, how they relate to migration and hybrid designs, and how to reason about them. The onboarding commands are read-only because they need machines and tenants you control. The runnable examples are JavaScript stand-ins: a fleet inventory with a policy check, and a delegation model that computes who may do what.

Hybrid, in practice

A hybrid environment mixes on-premises and cloud resources (see What Is Cloud Computing?). There are three common reasons for staying hybrid: data or latency rules that keep systems on site, an application that cannot be changed yet, and a phased migration that will take years. Your options, from least to most change:

  1. Lift and shift (rehost): move a VM as-is to an Azure VM. Fast, but you keep the patching work.
  2. Replatform: move to a managed service, for example a SQL Server to Azure SQL.
  3. Refactor: redesign the application for cloud services.
  4. Stay and manage: leave the machine where it is, but manage it with Azure tools. This is the job of Azure Arc.

Azure Arc

Azure Arc projects non-Azure resources into Azure Resource Manager (see Resource Groups and Azure Resource Manager). Once a machine is "Arc-enabled" it has a resource ID, belongs to a resource group and subscription, can have tags, and can be targeted by the same tools as an Azure VM, even if the real machine sits in your datacenter or in another cloud.

Arc-enabled servers install the Connected Machine agent on a Windows or Linux server. The agent makes only outbound HTTPS connections to Azure, so you do not open inbound firewall ports. Once connected you can:

Terminal
# Run on the server being onboarded (read-only here: it registers a real machine)
azcmagent connect \
  --resource-group rg-hybrid --tenant-id <tenant-id> \
  --subscription-id <subscription-id> --location westeurope

# From any workstation
az connectedmachine list --resource-group rg-hybrid --output table

Arc-enabled Kubernetes does the same for clusters: any CNCF-conformant cluster, on any infrastructure, can be connected, then managed with Azure Policy, GitOps configuration, Monitor and Defender.

Terminal
az connectedk8s connect --name factory-cluster-01 --resource-group rg-hybrid

Arc can also project SQL Server instances and run some Azure data and application services on your own hardware. Be clear about the boundary: Arc does not move the workload and does not make it highly available. It makes it manageable and governable from one place. Billing is per feature: connecting a machine is free, but plans such as Defender for Servers, extended security updates or Azure Monitor charge as usual.

A mixed fleet: a stand-in

The stand-in models an inventory of machines across Azure, an office and another cloud. It applies one policy ("must have the owner tag and be reporting") to all of them, as an Arc-enabled fleet would be.

JS One policy for a hybrid fleet

Press Run (or Ctrl + Enter) to see the console output here.

No output.

The machine you cannot see is the one you cannot govern, which is the main argument for onboarding everything.

Azure Lighthouse

Azure Lighthouse is for managed service providers, central IT teams that run several tenants, and any company that needs another organization to operate part of its Azure environment. The old way was to invite the provider's staff as guest users in every customer tenant, which means a separate sign-in per customer and no central view. Lighthouse replaces it with delegated resource management:

  • The customer (or a Marketplace offer) creates a registration definition: which tenant is the manager, which users or groups from that tenant, and which built-in roles each one gets.
  • A registration assignment applies that definition to a subscription or resource group.
  • Provider staff then sign in once to their own tenant and see the customers' delegated resources in the portal, CLI, APIs and tools, across many customers at once.

Safety properties worth remembering: the customer chooses the scope and the roles, can see and remove the delegation at any time, and every action is recorded in the activity log with the provider's user name. Roles with very high privileges, such as Owner, cannot be delegated, and you should grant the least privilege needed (for example Contributor for a resource group, Reader for monitoring). Groups are better than individual users so that staff changes do not require new delegations.

BICEP
// Customer side: a subscription-scope deployment (read-only sketch)
targetScope = 'subscription'

param managingTenantId string
param opsGroupObjectId string

var contributorRoleId = 'b24988ac-6180-42a0-ab88-20f7382dd24c' // built-in Contributor

resource def 'Microsoft.ManagedServices/registrationDefinitions@2022-10-01' = {
  name: guid('contoso-ops-definition')
  properties: {
    registrationDefinitionName: 'Contoso operations team'
    managedByTenantId: managingTenantId
    authorizations: [
      {
        principalId: opsGroupObjectId
        roleDefinitionId: contributorRoleId
        principalIdDisplayName: 'Contoso Ops'
      }
    ]
  }
}

resource assign 'Microsoft.ManagedServices/registrationAssignments@2022-10-01' = {
  name: guid('contoso-ops-assignment')
  properties: { registrationDefinitionId: def.id }
}

For comparison with other cross-tenant options: guest users (B2B) give a person an account in your tenant; Lighthouse gives your own users scoped access without leaving their tenant; management groups organize many subscriptions inside one tenant. Lighthouse is about crossing a tenant boundary.

Delegations: a stand-in

The stand-in stores delegations from three customers and answers "what may this provider engineer do?". It shows two properties of the real model: access is limited to the delegated scope, and removing a delegation removes access at once.

JS Who can do what with Lighthouse delegations

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Choosing between them

Question Use
Servers or clusters outside Azure need Azure governance Azure Arc
Another company's team must operate my Azure resources Azure Lighthouse
Many subscriptions in my own tenant Management groups
I want to move the workload itself Azure Migrate and replatforming (see Azure Data Factory and Migration)

They combine well: a provider can use Lighthouse to reach a customer's subscription and see the customer's Arc-enabled servers in the same view.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What does Azure Arc do for a server in your own datacenter?

    Arc extends management to the machine where it runs. It does not move or rebuild the workload.
  2. 2. How does the Connected Machine agent talk to Azure?

    Outbound-only HTTPS means no inbound ports need to be exposed to onboard a server.
  3. 3. What is the main advantage of Lighthouse over inviting guest users into every customer tenant?

    Delegated resource management gives centralized access without separate accounts, and the customer can revoke it.
  4. 4. Which role cannot be delegated through Azure Lighthouse?

    Owner and similar highly privileged roles are blocked, so delegations follow least privilege.

Summary

  • Hybrid options range from lift and shift to refactoring, or staying put and managing the workload with Azure Arc.
  • Arc-enabled servers and Kubernetes appear as Azure resources, using an outbound-only agent, and can use Policy, Defender, Monitor and RBAC.
  • Arc governs workloads; it does not move them or add resilience.
  • Azure Lighthouse gives another tenant scoped, auditable, revocable access through registration definitions and assignments.
  • Choose Arc for resources outside Azure, Lighthouse for crossing tenants, management groups inside one tenant.

Next: Project: Static Site with an API.