🚨 View Enterprise AKS Security SOP

Kubernetes AKS Masterclass Sprint

A 20-Day intensive deep dive into AKS starting from fundamentals to advanced Gateway, Security, and Azure DevOps integration.

▶️ Launch Udemy Course 🚀
🚨 View Enterprise AKS Security SOP
20
Total Days
20h
Total Content
183
Lectures
☁️ Azure Spot
Infrastructure

🚀 AKS Spot Cluster Automation — Deploy & Destroy

Execute these directly in Azure Cloud Shell. Always run 'Down' when finished to nuke the resources and stop billing.

curl -sSL "https://raw.githubusercontent.com/imranshs08/job/main/16-Automation-Scripts/azure_agc_lab_manager.sh" | bash -s -- up
curl -sSL "https://raw.githubusercontent.com/imranshs08/job/main/16-Automation-Scripts/azure_agc_lab_manager.sh" | bash -s -- down

🎯 20-Day Course Mission

"Loading motivation..."

Course Target: Oct 11, 2026
Loading...
Sprint Completion 0%

🤖 SRE AKS Notes Generator

Use this highly-crafted prompt to generate perfectly architected Markdown notes for each Udemy chapter.

📂 Open Notes Folder
Act as a **Senior AKS Platform Architect / SRE**. I am currently studying Kalyan Reddy Daida's "Azure Kubernetes Services (AKS) Made Easy" Udemy course. **▶️ CURRENT VIDEO TOPIC:** [ Paste the Video Title or Day Objective Here ] Please generate a high-fidelity, SRE-grade documentation markdown file based on the topic and my raw notes below. **Your output MUST rigorously follow this architecture:** 1. **The "Why" (Analogy):** Explain the core concept using a real-world infrastructure analogy (e.g., comparing Azure CNI vs Kubenet to physical router topologies). 2. **Mermaid Architecture Diagram:** Provide a highly detailed Markdown `mermaid` flowchart mapping the specific AKS abstraction being discussed (such as VNETs, Subnets, Node Pools, AGC Ingress flows, or Entra ID RBAC assignments). 3. **Execution Commands:** Provide the exact `az aks` and `kubectl` execution commands with parameters. Prioritize defensive scripting principles (no destructive commands without warnings). 4. **Production Gotchas & Cost Optimization:** Highlight Azure-specific quotas, limitations, Spot instance traps, or security boundaries. 5. **Interview Traps (STAR):** Present one high-level architectural interview question related to this topic, explicitly answered using the Situation, Task, Action, Result framework. **Antigravity (AI) Execution & Version Control Workflow:** 1. Do NOT just output the text in the chat. Use your `write_to_file` tool to save this documentation directly into my local repository at `c:\Job Tracker-Notes-Kubernetes\AKS-Masterclass\`. 2. Name the file sequentially based on the topic (e.g., `01_Topic_Name.md`, `02_Topic_Name.md`). Please run an `ls` or check the directory first to find the next available sequential number. 3. Before committing, use your tools to edit BOTH `c:\Job Tracker-Weekly-Planks-made-easy-sprint.md` AND `c:\Job Trackerks-expert-viewer.html`. Find the plaintext video title you just documented and wrap it in a relative markdown link for the tracker, and an HTML `` anchor for the dashboard. (e.g., `[Title](../../04-Notes/04-Kubernetes/AKS-Masterclass/03_Topic.md)`). 4. Once both the new note is created and the sprint tracker is linked, use `run_command` to `git add .`, `git commit -m "docs(aks): add notes for [Topic] and link in syllabus"`, and `git push` to the remote repository. --- **🧠 WHAT I LEARNED FROM THE VIDEO / RAW NOTES:** [ Paste your rough notes, transcripts, or command outputs here ]
📚 The 20-Day AKS Curriculum
☁️

Day 1: Intro to AKS & Containers Lec #1–10

What is K8s, Docker basics, AKS architecture.

☁️

Day 2: Cluster Provisioning Lec #11–20

Cluster types, control plane access, public vs private, VNET integration.

▶ ⏱️ 47m in Total (10 videos)
  • [12min] 11. Kubernetes architecture
  • [6min] 12. Self-managed vs Cloud-managed Kubernetes cluster
  • [5min] 13. What is Azure Kubernetes Service (AKS)?
  • [6min] 14. Azure pricing, free account and AKS cost
  • [14min] 15. Considerations for saving cost on AKS
  • [2min] 16. Login to Azure and set the subscription
  • [11min] 17. Let's create our first AKS cluster
  • [8min] 18. Install CLI, explore Azure Cloud Shell, connect to the cluster
  • [3min] 19. aks-preview extension and feature registration
  • [9min] 20. Making our life easier with autocompletion, alias, Kubernetes and AKS extension
☁️

Day 3: Node Pools Mastery Lec #21–30

System vs User node pools, scaling nodes, Spot instances.

▶ ⏱️ 47m in Total (10 videos)
  • [7min] 21. PowerShell Basics in AKS - Connect to Azure, AKS creation, completion, aliases
  • [5min] 22. Imperative and declarative approaches
  • [17min] 23. Practice with Nodes, Pod, Deployment, Replicaset, DaemonSet, Service, Secret, CM
  • [6min] 24. Understanding our CIDRs
  • [3min] 25. What is a node pool?
  • [4min] 26. Connect to AKS nodes - quick demo
  • [3min] 27. Exploring the AKS cluster - Kubernetes side
  • [3min] 28. kubelet
  • [4min] 29. containerd
  • [2min] 30. azure-ip-masq-agent
☁️

Day 4: AKS Networking (Part 1) Lec #31–38

Kubenet vs Azure CNI, core internal cluster networking.

▶ ⏱️ 30m in Total (8 videos)
  • [1min] 31. cloud-node-manager
  • [8min] 32. coredns
  • [3min] 33. coredns-autoscaler
  • [1min] 34. CSI
  • [5min] 35. konnectivity
  • [5min] 36. kube-proxy
  • [4min] 37. metrics-server
  • [3min] 38. Exploring the AKS cluster - Azure infrastructure side
☁️

Day 5: AKS Networking (Part 2) Lec #39–48

Services, SNAT, Outbound types, Calico.

▶ ⏱️ 47m in Total (10 videos)
  • [4min] ✅ 39. Virtual Machine Scale Set (VMSS)
  • [4min] ✅ 40. Virtual Network (VNET) and Subnet (SNET)
  • [4min] ✅ 41. Network Security Group (NSG)
  • [3min] ✅ 42. Route Table (RT)
  • [10min] ✅ 43. Load Balancer (LB) and Public IP (PIP)
  • [4min] ✅ 44. Managed Identity (MI)
  • [14min] ✅ 45. Important notes about AKS support policy
  • [24min] ✅ 46. Avoid this common mistake in AKS with the NRGLockdown feature
  • [8min] ✅ 47. Stop and Start feature
  • [8min] ✅ 48. About kubeconfig and how to work with multiple AKS clusters
☁️

Day 6: Identity & Access (Part 1) Lec #49–57

AKS-managed Microsoft Entra (AAD) integration, RBAC.

▶ ⏱️ 55m in Total (9 videos)
  • [10min] ✅ 49. Deploy and manage a Kubernetes application (Extension) from Azure Marketplace
  • [5min] ✅ 50. Install kubectl plugins with krew
  • [5min] ✅ 51. VM types: VMSS (Scale Set) vs VMAS (Availability Set)
  • [7min] ✅ 52. Understanding System and User node pool types
  • [7min] ✅ 53. Connect to AKS nodes - using helper pod
  • [8min] ✅ 54. Connect to AKS nodes - via SSH using Azure Bastion
  • [5min] ✅ 55. Connect to AKS nodes - via SSH using a pod
  • [4min] ✅ 56. Connect to AKS nodes - run-command invoke
  • [4min] ✅ 57. Node's Operating Systems in AKS
☁️

Day 7: Identity & Access (Part 2) Lec #58–66

Service Principals, Managed Identities, Workload Identity.

▶ ⏱️ 55m in Total (9 videos)
  • [4min] ✅ 58. Node pool with AzureLinux (Mariner) OS
  • [5min] ✅ 59. Create Windows node pool and connect to nodes
  • [1min] ✅ 60. Clarification about the next lecture (using Windows Server Core LTSC image)
  • [4min] ✅ 61. Schedule pods on specific node pools or specific OS type nodes
  • [4min] ✅ 62. Customize node configuration using az aks parameters
  • [3min] ✅ 63. Customize node configuration using DaemonSet
  • [5min] ✅ 64. OS disk types
  • [2min] ✅ 65. Default OS disk sizes
  • [6min] ✅ 66. Spot node pools
☁️

Day 8: Security Deep Dive (Part 1) Lec #67–75

Azure Key Vault integration using Secret Store CSI driver.

▶ ⏱️ 55m in Total (9 videos)
  • [7min] ✅ 67. GPU node pools
  • [5min] ✅ 68. Node pool snapshot
  • [5min] ✅ 69. Resize a node pool
  • [1min] ✅ 70. Important note! Kubenet network plugin will be retired in 2028
  • [10min] ✅ 71. Kubenet network plugin (retired in 2028)
  • [12min] ✅ 72. Azure CNI network plugin
  • [7min] ✅ 73. Azure CNI overlay network plugin
  • [2min] ✅ 74. Network plugins comparison
  • [1min] ✅ 75. Other network plugins
☁️

Day 9: Security Deep Dive (Part 2) Lec #76–85

Network Policies, AppArmor, Seccomp, Image Cleaner.

▶ ⏱️ 47m in Total (10 videos)
  • [10min] 76. Bring your own VNET/subnet, NSG and Route Table in AKS
  • [11min] 77. A deeper look into LoadBalancer Service in AKS
  • [5min] 78. Consideration when multiple NSGs are used
  • [10min] 79. Kubernetes Internal Load Balancer
  • [9min] 80. Use an Azure Private Link service to connect to an internal load balancer
  • [4min] 81. Understand VNET Peering
  • [3min] 82. SNAT in Azure
  • [10min] 83. Outbound types: Load Balancer, NAT Gateway and UserDefinedRouting (UDR)
  • [2min] 84. Create AKS with NAT Gateway
  • [11min] 85. Create AKS with UDR and Azure Firewall
☁️

Day 10: Scaling Operations Lec #86–94

HPA (Horizontal Pod Autoscaler), VPA, Cluster Autoscaler.

▶ ⏱️ 55m in Total (9 videos)
  • [12min] 86. Learn how AKS works with HTTP Proxy
  • [5min] 87. Install mitmproxy on a VM
  • [8min] 88. Deploy an AKS cluster with HTTP Proxy
  • [25min] 89. Explore, update, and troubleshoot AKS with HTTP Proxy
  • [7min] 90. Types of clusters in relation to control plane access
  • [2min] 91. Explore public AKS cluster
  • [3min] 92. Create public AKS cluster with VNET integration
  • [4min] 93. API server authorized IP ranges
  • [13min] 94. Create and connect to general and VNET integration private AKS cluster
☁️

Day 11: Storage in AKS Lec #95–104

Storage Classes, PV, PVC, CSI Drivers, Azure Disks/Files.

▶ ⏱️ 47m in Total (10 videos)
  • [3min] 95. az aks invoke command
  • [4min] 96. Run kubectl commands from worker nodes
  • [1min] 97. Clarification about the rebranding of Azure Active Directory to Microsoft Entra
  • [6min] 98. Understanding AKS-managed AAD integration with Azure RBAC and Kubernetes RBAC
  • [3min] 99. Prepare the environment for Azure RBAC
  • [11min] 100. Practice Azure RBAC
  • [6min] 101. Use custom role with Azure RBAC
  • [3min] 102. Prepare the environment for Kubernetes RBAC
  • [10min] 103. Practice Kubernetes RBAC
  • [4min] 104. Local accounts
☁️

Day 12: Monitoring & Observability Lec #105–114

Container Insights, Azure Monitor, Log Analytics, Troubleshooting.

▶ ⏱️ 47m in Total (10 videos)
  • [3min] 105. Identities in AKS
  • [5min] 106. Create an AKS cluster with service principal
  • [3min] 107. Certificate rotation
  • [12min] 108. Network policies in AKS
  • [9min] 109. Azure Key Vault Provider for Secrets Store CSI Drive
  • [4min] 110. Use autorotation for Azure Key Vault Secret Provider add-on
  • [12min] 111. Azure Policy for Kubernetes
  • [15min] 112. Microsoft Defender for Containers in AKS
  • [8min] 113. AppArmor in AKS
  • [9min] 114. Seccomp in AKS
☁️

Day 13: Cluster Maintenance Lec #115–123

Upgrading AKS clusters, node OS updates, certificate rotation.

▶ ⏱️ 55m in Total (9 videos)
  • [14min] 115. Use Image Cleaner (Eraser) in AKS
  • [16min] 116. Understand resource reservations and kube-reserved resource optimization in AKS
  • [4min] 117. Manually scale pod replicas and node count
  • [6min] 118. Stop/deallocate nodes with Scale-down mode
  • [7min] 119. Horizontal Pod Autoscaler (HPA)
  • [8min] 120. Vertical Pod Autoscaler (VPA)
  • [12min] 121. Cluster Autoscaler (CAS)
  • [12min] 122. Virtual nodes add-on for AKS
  • [9min] 123. KEDA in AKS
☁️

Day 14: Image Management Lec #124–133

Integrate AKS with ACR, automated updates, security scanning.

▶ ⏱️ 47m in Total (10 videos)
  • [6min] 124. Exploring the storage options in AKS
  • [4min] 125. Dynamically create Azure Disk
  • [3min] 126. Create snapshot and restore Azure Disk
  • [4min] 127. Resize Azure Disk
  • [6min] 128. Statically create Azure File
  • [8min] 129. Use a custom StorageClass to create Azure File with private endpoint and GRS
  • [7min] 130. Use a StatefulSet to dynamically create Azure Blob
  • [9min] 131. Understand Azure NetApp Files and Astra Trident
  • [12min] 132. Dynamically create Azure NetApp Files with Astra Trident in AKS
  • [3min] 133. Expand / resize an Azure NetApp Files volume
☁️

Day 15: Legacy Ingress Controllers Lec #134–142

Nginx Ingress controller setup, TLS termination with Cert-Manager.

▶ ⏱️ 55m in Total (9 videos)
  • [3min] 134. Activity logs
  • [5min] 135. Diagnose and solve problems and Ask Genie
  • [3min] 136. Resource Health and Azure Status
  • [2min] 137. Azure Advisor
  • [4min] 138. Metrics explorer for AKS
  • [2min] 139. Metrics explorer for AKS related resources
  • [6min] 140. Azure Monitor with Container Insights in AKS
  • [4min] 141. Explore Insights
  • [3min] 142. Explore Workbooks
☁️

Day 16: Modern Gateway API Lec #143–151

Working with Azure Application Gateway for Containers (AGC).

▶ ⏱️ 55m in Total (9 videos)
  • [4min] 143. Explore Logs
  • [2min] 144. Understanding Alerts
  • [4min] 145. Create out-of-the-box Alert
  • [5min] 146. Create custom Alert
  • [11min] 147. Diagnostics settings in AKS
  • [10min] 148. Monitor AKS with managed Prometheus and Grafana
  • [10min] 149. Understand and capture TCPDump on Linux node and collect it locally
  • [9min] 150. Capture TCPDump on Linux node with autorotation and store it in a file share
  • [3min] 151. Capture TCPDump on Linux pod with Mariner OS and collect it locally
☁️

Day 17: High Availability (HA) Lec #152–160

Multi-zone clusters, pod topology spread constraints, quotas.

▶ ⏱️ 55m in Total (9 videos)
  • [6min] 152. Add a TCPDump sidecar container to a pod
  • [12min] 153. Understanding K8s version, node image, the upgrade and why we need to upgrade
  • [4min] 154. Auto-upgrade Feature
  • [3min] 155. Planned Maintenance Feature
  • [10min] 156. What to check to prevent an upgrade failure
  • [4min] 157. Performing a Kubernetes version upgrade - All at once
  • [5min] 158. Performing a Kubernetes version upgrade - Blue green
  • [1min] 159. Performing a node image upgrade
  • [3min] 160. What is Azure Container Registry (ACR) and how the integration works?
☁️

Day 18: Azure DevOps (Part 1) Lec #161–168

Introduction to CI/CD on AKS, setting up pipelines.

▶ ⏱️ 30m in Total (8 videos)
  • [5min] 161. Create ACR and push/import our apps to it
  • [4min] 162. Integrate AKS and ACR - Azure/RBAC method
  • [3min] 163. Integrate AKS and ACR - Kubernetes/pull secret method
  • [10min] 164. Securely connect to ACR via a private connection
  • [4min] 165. What is an ingress controller?
  • [6min] 166. Using Application Gateway Ingress Controller (AGIC)
  • [9min] 167. Expose apps using a domain name on HTTPS
  • [6min] 168. Using nginx-ingress-controller in AKS
☁️

Day 19: Azure DevOps (Part 2) Lec #169–176

Helm charts in pipelines, blue/green deployments.

▶ ⏱️ 30m in Total (8 videos)
  • [9min] 169. Expose App on HTTPS with Cert-Manager and Let's Encrypt
  • [6min] 170. Use multiple ingress controllers in the same AKS cluster
  • [7min] 171. Gateway API basics
  • [10min] 172. What is Application Gateway for Containers?
  • [16min] 173. Using Application Gateway for Containers (including Gateway API and Ingress API)
  • [3min] 174. Free and Standard tiers for AKS cluster management
  • [9min] 175. Availability Zones in AKS
  • [10min] 176. Use Azure Front Door to route traffic between multiple AKS clusters
☁️

Day 20: Final Capstone Lab Lec #177–183

Deploying a full microservices app with identity, storage, and AGC.

▶ ⏱️ 1h 14m in Total (7 videos)
  • [4min] 177. Use custom domain and Azure Front Door certificate to expose apps in AKS
  • [8min] 178. Initial setup: Create a project, a service connection, add files, create ACR+AKS
  • [22min] 179. Example 1: Use a preconfigured Pipeline to build/push to ACR and deploy to AKS
  • [12min] 180. Example 2: Use a Pipeline configured by us to build/push to ACR, deploy to AKS
  • [6min] 181. Example 3: Use a Pipeline to run kubectl commands against our AKS cluster
  • [21min] 182. Setup a self-hosted agent and use it to deploy to ACR and AKS
  • [1min] 183. Bonus Lecture

🔐 Enterprise AKS RBAC & Local Account Security SOP

Validate, troubleshoot, restrict, and audit AKS access when Azure permissions change.


1. Explain the AKS Access Model

A fundamental flaw in Enterprise Cloud Security is assuming that Azure Resource Manager (ARM) permissions explicitly correlate to internal application permissions. They are entirely decoupled topologies.

Azure Identity (User/SPN)
  ↳ Microsoft Entra ID (Formerly AAD)
    ↳ Azure Resource Manager Permissions (ARM RBAC)
      ↳ AKS Resource Plane
        ↳ AKS Authentication (kubeconfig retrieval)
          ↳ Kubernetes Authorization (K8s RBAC)
            ↳ Kubernetes API Server
              ↳ kubectl

Azure Resource RBAC

Examples: Reader, Contributor, Owner.

These control access to the Azure AKS resource itself (e.g., updating scaling blocks, deleting the cluster via the Azure Control Plane).

Kubernetes RBAC

Examples: Role, ClusterRole, RoleBinding.

These control what an explicitly authenticated identity can execute fundamentally inside the Kubernetes Data Plane (e.g., reading Secrets, deleting Pods).

⚠️ Azure RBAC for Kubernetes vs Local Accounts

Azure RBAC for Kubernetes: AKS can use Azure RBAC for fundamental K8s authorization natively, but this must NOT be confused with standard ARM (Reader/Contributor) roles. You assign specific "Azure Kubernetes Service RBAC Reader" roles.

AKS Local Accounts: Local accounts represent a completely decoupled, parallel path. If Local Accounts are enabled (they are by default historically), the cluster generates a static, immutable cluster-admin credential wrapper.

CRITICAL MAXIM: Azure Reader does NOT automatically mean "no kubectl access".


2. The Real-World Vulnerability Scenario

INITIAL STATE: User is Contributor (Azure) and cluster-admin (K8s).
DEMOTION: User is aggressively demoted to Reader via Azure Active Directory.
THE EXPLOIT: The demoted user executes the following command and inexplicably retains lethal God-Level access to the cluster over kubectl.

> az aks get-credentials --resource-group <RESOURCE_GROUP> --name <AKS_NAME>
Merged "myAKS" as current context in ~/.kube/config

> kubectl get nodes
NAME STATUS ROLES AGE VERSION
aks-nodepool1-12345678-vmss000000 Ready agent 120d v1.30.2

Why does this zero-day scenario occur?

  1. ARM Reader Permissions: The Azure Reader role fundamentally possesses the Microsoft.ContainerService/managedClusters/listClusterUserCredential/action permission. This permits the user to download the API keys.
  2. Persistent K8s Auth: Kubernetes authorization (ClusterRoleBindings) is internal. Just because Azure AD roles were stripped externally does NOT revoke the static `cluster-admin` mapping internally inside K8s if they aren't actively synced.
  3. Local Accounts Backdoor: When users pull credentials natively via Azure CLI, if Local Accounts are active, Azure hands them a static admin token embedded in the kubeconfig that totally bypasses Entra ID validation.
  4. Cached Kubeconfig: Even if permissions drop entirely, a previously cached ~/.kube/config credential block can persist for up to 60-90 minutes depending on token cache lifetime.

⏳ Critical Warning: Certificate Lifespan

The static client-certificate-data generated by an AKS local account does NOT expire in hours or days. It has an active cryptographic validity period of 2 Full Years (730 Days) from creation.

Because these are mathematical X.509 certificates validated implicitly by the internal K8s API server, taking away a user's Azure AD privileges does nothing to invalidate the token. A downloaded kubeconfig will continue to grant silent, unaudited cluster-admin access for up to 24 months.

💥 Blast Radius Analysis: `--disable-local-accounts`

Executing the remediation effectively burns all local certificates. You must anticipate the following infrastructure breakage:

1. CI/CD Pipeline Failure: Any Jenkins, GitHub Actions, or Azure DevOps pipelines relying on exactly az aks get-credentials --admin will instantly hard crash. They must be migrated to Azure Service Principals via kubelogin.
2. Developer Lockout: All developers will temporarily lose raw `kubectl` access until they install the Microsoft kubelogin module to authenticate over Entra ID (OIDC) Device Code authorization.
3. Legacy Tooling: External monitoring agents (Datadog, Prometheus) wired manually utilizing the raw Admin token will immediately go dark until migrated to native K8s ServiceAccounts.

3. Enterprise Remediation & Runbook

Prerequisites

Azure CLI configured with Owner or User Access Administrator roles. Execution across the native AKS VNET (if API server is private).

Forensic Validation (Determining the Path)

Verify if the credential leak is tied to a Local Account bypass or an Entra ID cache:

# Analyze the underlying kubeconfig footprint
> kubectl config view --raw
# Look for OIDC tokens vs static client-certificate-data

Immediate Remediation

⚠️ Dependency Trap: The v1.25 Lockout Safeguard

Since Kubernetes v1.25, Azure Resource Manager (ARM) actively blocks the --disable-local-accounts command if your cluster is not already fundamentally bound to a secondary identity provider. If allowed to proceed, it would permanently brick the cluster with zero authentication paths.

[PREREQUISITE] Enable Entra ID & Azure RBAC:

az aks update -g <RG> -n <AKS> --enable-aad --enable-azure-rbac

Step 1: Disable Local Accounts

> az aks update --resource-group <RG> --name <AKS> --disable-local-accounts

Step 2: Destroy Stale Internal K8s Bindings

> kubectl get clusterrolebindings | grep -i <USER_EMAIL>
> kubectl delete clusterrolebinding <COMPROMISED_BINDING>

Step 3: Force Entra ID Token Rotation / Revocation

> Revoke-AzureADUserAllRefreshToken -ObjectId <USER_OBJECT_ID>

Enterprise Verification

Run a test `kubectl` command natively authenticated as the target compromised user. They should immediately be hit with Error from server (Forbidden).

Break-Glass / Rollback

If disabling local accounts causes CI/CD Service Principals to break (a very common disruption), rollback utilizing:

> az aks update --resource-group <RG> --name <AKS> --enable-local-accounts

Ultimate Enterprise Recommendation


4. Guest & External Account RBAC Gotcha

THE SCENARIO: When deploying Insider Threat Labs or provisioning external contractors (e.g., @gmail.com or @outlook.com accounts), assigning Azure RBAC roles via --assignee user@domain.com often fails with expected one argument or resource not found.

Entra ID converts external guest emails into complex User Principal Names (UPNs) containing #EXT#@tenant.onmicrosoft.com. Relying on string-based email matching in the Azure CLI is inherently fragile for guest identities.

The Solution: Immutable Object IDs

Instead of querying by UPN, hardcode or dynamically resolve the guest's Object ID from the Entra ID Portal, bypassing email lookups entirely:

BASH > EMP_ID="<YOUR_OBJECT_ID>"
> az role assignment create \
  --role "Azure Kubernetes Service RBAC Cluster Admin" \
  --assignee-object-id $EMP_ID \
  --assignee-principal-type User \
  --scope /subscriptions/<SUB_ID>/.../managedClusters/<CLUSTER>