Skip to content

Commit 861d4c9

Browse files
authored
Merge pull request #18226 from sethmanheim/akstsg6-17
Add new AKS Arc kubectl TSG
2 parents 7e12b07 + 24a36ce commit 861d4c9

File tree

3 files changed

+45
-2
lines changed

3 files changed

+45
-2
lines changed

AKS-Arc/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@
189189
href: network-validation-errors.md
190190
- name: Network validation error due to .local domain
191191
href: network-validation-error-local.md
192+
- name: Entra authentication prompts when running kubectl
193+
href: entra-prompts.md
192194
- name: BGP with FRR not working
193195
href: connectivity-troubleshoot.md
194196
- name: Reference

AKS-Arc/entra-prompts.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
title: Entra authentication prompts when running kubectl with Kubernetes RBAC
3+
description: Learn how to troubleshoot Entra authentication issues when using kubectl with Kubernetes RBAC.
4+
author: sethmanheim
5+
ms.author: sethm
6+
ms.topic: troubleshooting
7+
ms.date: 06/24/2025
8+
ms.reviewer: leslielin
9+
ms.lastreviewed: 06/24/2025
10+
11+
---
12+
13+
# Repeated Entra authentication prompts when running kubectl with Kubernetes RBAC
14+
15+
This article helps you diagnose and resolve issues related to repeated Entra authentication prompts when using **kubectl** with Kubernetes RBAC on AKS enabled by Azure Arc.
16+
17+
## Symptoms
18+
19+
When you use **kubectl** with [Microsoft Entra authentication and Kubernetes RBAC](kubernetes-rbac-local.md) in AKS on Azure Local, Entra authentication prompts appear after each command execution.
20+
21+
## Possible causes
22+
23+
This issue is caused by [a GitHub bug](https://github.com/Azure/kubelogin/issues/654) introduced in **kubelogin** version 0.2.0 and later.
24+
25+
## Mitigation
26+
27+
To mitigate this issue, you can use one of the following two methods:
28+
29+
- Downgrade **kubelogin** to version 1.9.0. This stable version does not have the bug that causes repeated authentication prompts. You can [download this version from the GitHub repository](https://github.com/int128/kubelogin/releases/tag/v1.9.0). Select the appropriate asset for your OS or architecture, extract it, and replace your existing **kubelogin** binary.
30+
- Alternatively, if you have administrator permissions, you can use the `--admin` flag with the `az aksarc get-credentials` command. This method bypasses **kubelogin** authentication by retrieving admin credentials directly:
31+
32+
```azurecli
33+
az aksarc get-credentials -g $resource_group_name -n $aks_cluster_name --file <file-name> --admin
34+
```
35+
36+
## Next steps
37+
38+
[Troubleshoot issues in AKS enabled by Azure Arc](aks-troubleshoot.md)

AKS-Arc/kubernetes-rbac-local.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ title: Control access using Microsoft Entra ID and Kubernetes RBAC in AKS enable
33
description: Learn how to use Microsoft Entra group membership to restrict access to cluster resources using Kubernetes role-based access control (Kubernetes RBAC) in AKS Arc.
44
author: sethmanheim
55
ms.author: sethm
6-
ms.lastreviewed: 07/26/2024
6+
ms.lastreviewed: 06/17/2025
77
ms.reviewer: abha
88
ms.topic: how-to
99
ms.custom:
1010
- devx-track-azurecli
11-
ms.date: 07/26/2024
11+
ms.date: 06/17/2025
1212

1313
# Intent: As an IT Pro, I need to learn how to enable Kubernetes role-based access control so that I can manage access to resources.
1414
# Keyword: Kubernetes role-based access control
@@ -34,6 +34,9 @@ Before you set up Kubernetes RBAC using Microsoft Entra ID, you must have the fo
3434
- To access the Kubernetes cluster directly using the `az aksarc get-credentials` command, you need the **Microsoft.HybridContainerService/provisionedClusterInstances/listUserKubeconfig/action**, which is included in the **Azure Kubernetes Service Arc Cluster User** role permissions
3535
- To access the Kubernetes cluster from anywhere with a proxy mode using `az connectedk8s proxy` command, you need the **Microsoft.Kubernetes/connectedClusters/listClusterUserCredential/action**, which is included in **Azure Arc-enabled Kubernetes Cluster User** role permission. Meanwhile, you need to verify that the agents and the machine performing the onboarding process meet the network requirements in [Azure Arc-enabled Kubernetes network requirements](/azure/azure-arc/kubernetes/network-requirements?tabs=azure-cloud#details).
3636

37+
> [!NOTE]
38+
> When you use **kubelogin version 1.9.0** with Microsoft Entra authentication and Kubernetes RBAC in AKS on Azure Local, you might encounter Entra authentication prompts for each command you run. For a solution to this known issue, see [Repeated Entra authentication prompts when running kubectl with Kubernetes RBAC](entra-prompts.md).
39+
3740
## Optional first steps
3841

3942
If you don't already have a Microsoft Entra group that contains members, you might want to create a group and add some members, so that you can follow the instructions in this article.

0 commit comments

Comments
 (0)