Kubernetes on AKS (Azure) Setup

Overview

Heeler can automatically harvest AKS resources and model them as services linked to your existing code base. To do so, four pieces must be in place:

  • Azure connection

  • AKS access granted to Heeler IPs (the same IPs noted under Getting Started)

  • The AKS clusters grant the Service Principal used for Azure connection the Access control (IAM) > Role Assignment Azure Kubernetes Service RBAC Cluster Admin

  • The AKS clusters have Security Configuration > Authentication and Authorization set to Microsoft Entra ID authentication with Azure RBAC

Azure Connection

Heeler must be able to connect to your Azure subscriptions that host your AKS resources. By following the steps outlined in the Azure Cloud Setup, you will have met this condition for AKS connectivity.

AKS Access Granted to Heeler IPs

Heeler must have connectivity to reach your AKS clusters. Their networking configurations must include Heeler's two IPs in the Authorized IP ranges. To set those values in the Azure console for each cluster:

  1. Navigate to the Settings > Networking > Overview > Resource Settings

  2. Click on Manage and populate the Authorized IP ranges setting with a comma-separated list 44.221.229.40/32,52.73.231.96/32

  3. Click Save

If using terraform to manage your AKS cluster, the api_server_access_profile definition should include these values for authorized_ip_ranges:

AKS Service Principal assigned Roles

The Service Principal used for Azure connection must have two Role Assignments

To add/update the Role Assignments in the Azure console for each cluster:

  1. Navigate to the Access control (IAM)

  2. Select Add and Add role assignment

  1. For each role, search for the role, select it, and click Next

  1. Under Add role assignment > Members:

    1. Confirm Assign access to is set to User, group, or service principal

    2. Click on + Select members

    3. Search for the name of your Service Principal, select, and then click Select

    4. Click on Review + assign until returning to the Access control (IAM) view and confirm the role assignment has been added

Repeat for the second role

If using terraform to manage your AKS cluster, there should be two azurerm_role_assignment resources that add the two roles to the service principal defined by its app/client ID and scoped to the AKS cluster:

AKS Authentication and Authorization

The Security configuration must include an Authentication and Authorization setting of Microsoft Entra ID authentication with Azure RBAC:

  1. Navigate to the Settings > Security Configuration > Authentication and Authorization

  2. Click on the Authentication and Authorization drop down and select Microsoft Entra ID authentication with Azure RBAC

  3. Click on Apply

If using terraform to manage your AKS cluster, the key settings used above that apply are

After completing these steps and allowing time for the settings to propagate, Heeler should be able to harvest your AKS resources and relate them to other harvested Azure resources in your cloud environment.

Last updated

Was this helpful?