Skip to content

Add missing identity and RBAC prerequisites for PIS with private ACR - #466

Open
Richard Hooper (PixelRobots) wants to merge 2 commits into
MicrosoftDocs:mainfrom
PixelRobots:fix/pis-private-acr-and-rbac-prereqs
Open

Add missing identity and RBAC prerequisites for PIS with private ACR#466
Richard Hooper (PixelRobots) wants to merge 2 commits into
MicrosoftDocs:mainfrom
PixelRobots:fix/pis-private-acr-and-rbac-prereqs

Conversation

@PixelRobots

Copy link
Copy Markdown
Contributor

Problem

The current documentation for creating a node pool with a Prepared Image Specification (PIS) is missing several prerequisites that cause cryptic failures in practice. Testing against the preview revealed three undocumented requirements:

  1. Control plane Reader role - The AKS cluster's control plane managed identity requires the Reader role on the resource group containing the PIS resource. Without this, nodepool add fails with ResourceMissingPermissionError: Check access result not allowed for action Microsoft.ContainerService/preparedImageSpecifications/read.

  2. Private ACR requires --assign-identity - When images are in a private ACR, the PIS must be created with --assign-identity pointing to a managed identity with AcrPull. Without it, the build VM has no managed identity and cannot authenticate to pull images. This causes FailedToCreateNodeCustomizationVHD with registry authentication failures.

  3. --assign-identity requires user-assigned cluster identity - Using --assign-identity on the PIS requires the AKS cluster to have been created with a user-assigned managed identity (not the default system-assigned). If the cluster uses system-assigned identity, nodepool add fails with: "The prepared image specification references a managed identity. As a result, this cluster must have a user-assigned managed identity."

Changes

  • Prerequisites: Added bullets for the Reader role requirement and the --assign-identity/user-assigned identity requirement
  • Create a PIS with cached images: Expanded with a --assign-identity example using the kubelet identity, with a NOTE explaining when it's optional (public/anon-pull registries)
  • Create a node pool using a PIS: Added a new step to grant the Reader role before running nodepool add
  • Node pool creation fails: Added two troubleshooting bullets covering the RBAC and ACR identity gaps
  • Links: Added az-role-assignment-create reference

Verification

All three issues were reproduced and confirmed against the live preview feature (AKSPreparedImageSpecificationPreview feature flag, aks-preview 21.0.0b5+, UK South region).

…luding role assignments for private ACR access

Signed-off-by: PixelRobots <littlehoops@gmail.com>
@prmerger-automator

Copy link
Copy Markdown
Contributor

Richard Hooper (@PixelRobots) : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@prmerger-automator

Copy link
Copy Markdown
Contributor

Richard Hooper (@PixelRobots) : Thanks for your contribution! The author(s) and reviewer(s) have been notified to review your proposed change.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 131d6e7:

✅ Validation status: passed

File Status Preview URL Details
articles/aks/prepared-image-specification.md ✅Succeeded

For more details, please refer to the build report.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 9078ae0:

✅ Validation status: passed

File Status Preview URL Details
articles/aks/prepared-image-specification.md ✅Succeeded

For more details, please refer to the build report.

@v-regandowner

Copy link
Copy Markdown
Contributor

Erin Schaffer (@schaffererin)

Can you review the proposed changes?

IMPORTANT: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.

#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the AKS Prepared Image Specification (PIS) preview documentation to include missing identity and RBAC prerequisites that otherwise cause confusing failures when creating node pools from a PIS, especially when caching images from a private ACR.

Changes:

  • Added prerequisites and a new step to grant the AKS control plane managed identity Reader access to the resource group that contains the PIS.
  • Documented private ACR requirements for PIS image caching using --assign-identity, including an example using the kubelet identity and troubleshooting guidance.
  • Added a new CLI reference link for az role assignment create.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

CLUSTER_IDENTITY=$(az aks show \
--resource-group $RESOURCE_GROUP \
--name $CLUSTER_NAME \
--query identity.principalId -o tsv)
--cluster-name $CLUSTER_NAME \
--name userpool \
--query "{state:provisioningState, pisId:preparedImageSpecificationId}"
--query "{state:provisioningState, pisId:preparedImageSpecificationProfile.preparedImageSpecificationId}"
```

> [!NOTE]
> Allow 30-60 seconds for the role assignment to propagate before proceeding to the next step.
@github-actions

Copy link
Copy Markdown

This pull request has been inactive for at least 14 days. If you are finished with your changes, don't forget to sign off. See the contributor guide for instructions.
Get Help
Docs Support Teams Channel
Resolve Merge Conflict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants