Skip to main content

Enable Microsoft Entra ID for AKS

Palette provides support for Microsoft Entra ID for Azure Kubernetes Service (AKS) clusters. This allows you to manage access to your AKS clusters using Microsoft Entra ID identities.

This guide helps you configure your cluster profile with the appropriate settings to enable Microsoft Entra ID integration for your AKS clusters.

Prerequisites​

  • An active Azure cloud account integrated with Palette. Review Register and Manage Azure Cloud Account for guidance.

  • A Palette account with either Cluster Profile Admin or Cluster Profile Editor permissions depending on whether you are creating a new cluster profile or editing an existing one. Refer to Cluster Profile Roles and Permissions for more information.

  • The service principal associated with your Azure cloud account must have the built-in Azure Kubernetes Service RBAC Cluster Admin role assigned at the appropriate scope level. This is in addition to the Required Permissions for cluster provisioning. Refer to Steps to assign an Azure role for guidance.

  • Microsoft Entra ID group object IDs for members that you want to receive cluster-admin Kubernetes role privileges. You can use an existing Microsoft Entra ID group or create a new one for this purpose. Refer to the Microsoft Entra ID documentation for guidance on creating groups and obtaining their object IDs.

    • The groups you specify cannot be changed after cluster creation, so ensure you have the correct group object IDs before proceeding.
  • Azure CLI installed and configured on your local machine. This is required for validating that Microsoft Entra ID integration is active on your AKS clusters. Refer to the Install Azure CLI guide for instructions.

    • You will need membership of one of the admin groups to be able to validate the integration.

Enable Microsoft Entra ID Integration​

  1. Log in to Palette.

  2. From the left main menu, select Profiles.

  3. Click on the cluster profile you want to edit or create a new cluster profile.

    • If editing an existing cluster profile, create a new version of the cluster profile.

    • If creating a new cluster profile, choose a cluster profile Type of Infrastructure or Full, and select Azure AKS for the cloud type. Add profile layers as needed. When you are finished creating the cluster profile, select it from the Profiles page to edit it.

  4. Click on the kubernetes-aks layer to edit the pack parameters.

  5. Under Pack Details, select Values.

  6. In the YAML editor, add the following parameters to enable Microsoft Entra ID integration for your AKS clusters.

    managedControlPlane:
    aadProfile:
    managed: true
    adminGroupObjectIDs:
    - "<microsoft-entra-id-group-object-id-1>"
    - "<microsoft-entra-id-group-object-id-2>"
    disableLocalAccounts: true

    Review the following table for an explanation of these parameters.

    ParameterDescriptionExample value
    managedControlPlane.aadProfile.managedSet to true to enable Microsoft Entra ID integration for your AKS clusters.true
    managedControlPlane.aadProfile.adminGroupObjectIDsProvide a list of Microsoft Entra ID group object IDs for members that you want to receive cluster-admin Kubernetes role privileges. This is a required parameter when managedControlPlane.aadProfile.managed is set to true.["aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb"]
    managedControlPlane.aadProfile.disableLocalAccountsSet to true to disable local accounts for your AKS clusters. When set to true:

    - az aks get-credentials --admin no longer works.
    - Only Microsoft Entra ID authentication is allowed.
    - The cluster kubeconfig will be token-based and will be valid for approximately 1 hour. After that, you will need to download the kubeconfig again from Palette.
    true
    warning

    The managedControlPlane.* fields are immutable and must be finalized at cluster creation (Day-1). Once a cluster is deployed, do not attempt to add, remove, or change these settings in the cluster profile.

    If you do, the Cluster API Provider Azure (CAPZ) admission webhook will reject the change and Palette will enter a reconciliation loop, blocking Day-2 operations and generating repeated ReconcileError events on the cluster. These events can happen even if the underlying Kubernetes cluster reports as healthy.

  7. After making the necessary changes, click Confirm Updates.

  8. On the cluster profile page, click Save Changes.

You can now use this cluster profile to create new AKS clusters with Microsoft Entra ID integration enabled. If you want to deploy existing AKS clusters with Microsoft Entra ID integration, you can apply the updated cluster profile to those clusters. Review the Update a Cluster guide for more information.

info

Applying these settings to an existing cluster will not trigger any repaves.

Validate​

You can only validate these settings after you have deployed or updated a cluster using the cluster profile with Microsoft Entra ID integration enabled.

  1. Log in to Palette.

  2. From the left main menu, select Clusters.

  3. Click on the AKS cluster you want to validate.

  4. Confirm the Cluster Status is Running. Then, from the cluster's Overview tab, download the Admin Kubeconfig File.

  5. Open a terminal session and use the following command to verify that Microsoft Entra ID authentication is active on the cluster. Replace <cluster-name> and <resource-group> with your cluster's name and resource group. You will need read access to the cluster's resource group in Azure to use this command.

    az aks show \
    --name <cluster-name> \
    --resource-group <resource-group> \
    --query "aadProfile"

    The output should show "managed": true and your admin group object IDs.

    Example output
    {
    "adminGroupObjectIds": ["aaaaaaaa-0000-1111-2222-bbbbbbbbbbbb"],
    "managed": true,
    "tenantId": "aaaabbbb-0000-cccc-1111-dddd2222eeee"
    }
  6. Set the KUBECONFIG environment variable to point to the downloaded kubeconfig file.

    export KUBECONFIG=<path-to-downloaded-kubeconfig>
  7. Use the following command to verify that you can authenticate to the cluster and have cluster-admin privileges. Ensure you are signed in with a Microsoft Entra ID user that is a member of one of the admin groups you specified in the cluster profile.

    kubectl auth can-i '*' '*' --all-namespaces

    The output should be yes.

    Example output
    yes

Next Steps​