Skip to content

Commit dca56a9

Browse files
Fix merge conflicts
2 parents 72e5124 + d2271f5 commit dca56a9

File tree

59 files changed

+2157
-611
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2157
-611
lines changed

AKS-Hybrid/TOC.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,10 @@
6464
href: deploy-load-balancer-portal.md
6565
# - name: Troubleshoot issues
6666
# href: load-balancer-troubleshoot.md
67-
- name: Security and authentication
67+
- name: Authentication and authorization
6868
items:
69+
- name: Enable Microsoft Entra ID authentication for Kubernetes clusters
70+
href: enable-authentication-microsoft-entra-id.md
6971
- name: Use Azure RBAC for Kubernetes authorization
7072
href: azure-rbac-23h2.md
7173
- name: Use Kubernetes RBAC with Microsoft Entra ID

AKS-Hybrid/aks-edge-troubleshoot-overview.md

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn about common issues and workarounds in AKS Edge Essentials.
44
author: rcheeran
55
ms.author: rcheeran
66
ms.topic: conceptual
7-
ms.date: 01/08/2024
7+
ms.date: 07/22/2024
88
ms.custom: template-concept
99
---
1010

@@ -31,7 +31,7 @@ Get-ExecutionPolicy
3131
if ((Get-ExecutionPolicy) -ne "RemoteSigned") { Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process -Force }
3232
```
3333

34-
### Low disk space causes precached container images to be deleted
34+
### Low disk space causes previously cached container images to be deleted
3535

3636
When the node runs out of disk space, some of the preloaded images are garbage collected by the `containerd` runtime. In this case, first free up some disk space, and then run the following command to pull the cached images again:
3737

@@ -48,9 +48,9 @@ This script checks for the missing images and reimports them as needed.
4848
Workaround: If the pods aren't cleaned up, run the following commands to manually clean up the existing Azure Arc-related resources before trying to reconnect again:
4949

5050
```powershell
51-
kubectl delete ns azure-arc
52-
kubectl delete clusterrolebinding azure-arc-operator
53-
kubectl delete secret sh.helm.release.v1.azure-arc.v1
51+
kubectl delete ns azure-arc
52+
kubectl delete clusterrolebinding azure-arc-operator
53+
kubectl delete secret sh.helm.release.v1.azure-arc.v1
5454
```
5555

5656
2. Issue: Azure Arc connectivity doesn't work in a proxy environment.
@@ -63,7 +63,32 @@ This script checks for the missing images and reimports them as needed.
6363

6464
### Failed to get nodeagent certificate: Not Found
6565

66-
Check the network adapter configuration. During deployment, AKS Edge Essentials needs an adapter that's enabled and has the correct IP address, subnet, and default gateway. These values are automatically populated in a DHCP environment. If you're setting manually, ensure all three are set. In many cases the default gateway isn't set, which results in this error.
66+
Check the network adapter configuration. During deployment, AKS Edge Essentials needs an adapter that's enabled and has the correct IP address, subnet, and default gateway. These values are automatically populated in a DHCP environment. If you're setting manually, ensure all three are set. In many cases, the default gateway isn't set, which results in this error.
67+
68+
## Kubernetes
69+
70+
### Kube-vip pod continuously restarts
71+
72+
In some scenarios, the **kube-vip** pod loops and restarts continuously.
73+
74+
#### Validation
75+
76+
To confirm that the scenario you're encountering is the same issue documented in this article, check that the kube-vip pod in the **kube-system** namespace has a high number of restarts by running the following command:
77+
78+
```bash
79+
kubectl get pods –n kube-system
80+
```
81+
82+
#### Cause
83+
84+
There are a few different reasons why the kube-vip pod might be constantly restarting. These causes include:
85+
86+
- Using an OS disk that is not backed with an SSD disk, or a premium SSD disk when using an Azure VM. You can [review the hardware requirements here](aks-edge-system-requirements.md#hardware-requirements).
87+
- Disk latency is too high. If the disk latency is greater than 10 ms, it can result in request timeouts, leader loss, and potential cluster instability. You can [review the hardware requirements for etcd here](https://etcd.io/docs/v3.4/op-guide/hardware/).
88+
89+
#### Resolution
90+
91+
To mitigate this issue, review your underlying storage infrastructure to ensure that it meets the performance requirements for etcd and AKS Edge Essentials. Also, consider using premium SSD-backed storage or optimizing your storage configuration for performance.
6792

6893
## Next steps
6994

AKS-Hybrid/azure-rbac-23h2.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ ms.custom: devx-track-azurecli
66
author: sethmanheim
77
ms.author: sethm
88
ms.reviewer: leslielin
9-
ms.date: 07/10/2024
10-
ms.lastreviewed: 07/10/2024
9+
ms.date: 07/26/2024
10+
ms.lastreviewed: 07/26/2024
1111

1212
# Intent: As an IT Pro, I want to use Azure RBAC to authenticate connections to my AKS clusters over the Internet or on a private network.
1313
# Keyword: Kubernetes role-based access control AKS Azure RBAC AD
@@ -33,7 +33,6 @@ Before you begin, make sure you have the following prerequisites:
3333
- AKS on Azure Stack HCI 23H2 currently supports enabling Azure RBAC only during Kubernetes cluster creation. You can't enable Azure RBAC after the Kubernetes cluster is created.
3434
- Install the latest version of the **aksarc** and **connectedk8s** Azure CLI extensions. Note that you need to run the **aksarc** extension version 1.1.1 or later to enable Azure RBAC. Run `az --version` to find the current version. If you need to install or upgrade Azure CLI, see [Install Azure CLI](/cli/azure/install-azure-cli).
3535

36-
3736
```azurecli
3837
az extension add --name aksarc
3938
az extension add --name connectedk8s
@@ -53,7 +52,7 @@ Before you begin, make sure you have the following prerequisites:
5352
- New role assignments can take up to five minutes to propagate and be updated by the authorization server.
5453
- Once Azure RBAC is enabled, you can access your Kubernetes cluster with the given permissions using either direct mode or proxy mode.
5554
- 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 permission.
56-
- 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 specified in [Azure Arc-enabled Kubernetes network requirements](/azure/azure-arc/kubernetes/network-requirements?tabs=azure-cloud#details).
55+
- To access the Kubernetes cluster from anywhere with a proxy mode using the `az connectedk8s proxy` command, or from the Azure portal, you need the **Microsoft.Kubernetes/connectedClusters/listClusterUserCredential/action** action, which is included in the **Azure Arc-enabled Kubernetes Cluster User** role permission. Meanwhile, you must verify that the agents and the machine performing the onboarding process meet the network requirements specified in [Azure Arc-enabled Kubernetes network requirements](/azure/azure-arc/kubernetes/network-requirements?tabs=azure-cloud#details).
5756
- To use **kubectl**, you can access it using either Azure RBAC or the AAD Admin Group.
5857
- To use kubectl with Azure RBAC, you need the **Azure Arc Kubernetes Viewer** role scoped to the connected cluster resource.
5958
- To use kubectl with the AAD Admin Group, you don't need any specific role, but you must ensure you are in one of the groups in the **add-admin-group** list of the connected cluster resource.
@@ -167,7 +166,7 @@ Run the following steps on another client device:
167166
```azurecli
168167
az connectedk8s proxy -n $CLUSTER_NAME -g $RESOURCE_GROUP
169168
```
170-
169+
171170
> [!NOTE]
172171
> This command opens the proxy and blocks the current shell.
173172
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
title: Enable Microsoft Entra authentication for Kubernetes clusters
3+
description: Learn how to enable Microsoft Entra ID on Azure Kubernetes Service with kubelogin and authenticate Azure users with credentials or managed roles.
4+
author: sethmanheim
5+
ms.author: sethm
6+
ms.lastreviewed: 07/26/2024
7+
ms.reviewer: abha
8+
ms.topic: how-to
9+
ms.custom:
10+
- devx-track-azurecli
11+
ms.date: 07/26/2024
12+
13+
# Intent: As an IT Pro, I need to learn how to enable Microsoft Entra ID authentication for Kubernetes clusters
14+
# Keyword: Microsoft Entra ID
15+
---
16+
17+
# Enable Microsoft Entra authentication for Kubernetes clusters
18+
19+
Applies to: AKS on Azure Stack HCI 23H2
20+
21+
AKS enabled by Azure Arc simplifies the authentication process with Microsoft Entra ID integration. For authorization, cluster administrators can configure Kubernetes role-based access control (Kubernetes RBAC) or Azure role-based access control (Azure RBAC) based on the directory group membership of the Microsoft Entra ID integration.
22+
23+
Microsoft Entra authentication is provided to AKS Arc clusters with OpenID Connect. OpenID Connect is an identity layer built on top of the OAuth 2.0 protocol. For more information about OpenID Connect, see the [OpenID Connect documentation](/entra/identity-platform/v2-protocols-oidc). For more information about the Microsoft Entra integration flow, see the [Microsoft Entra documentation](concepts-security-access-identity.md#microsoft-entra-integration).
24+
25+
This article describes how to enable and use Microsoft Entra ID authentication for Kubernetes clusters.
26+
27+
## Before you begin
28+
29+
- This configuration requires that you have a Microsoft Entra group for your cluster. This group is registered as an admin group on the cluster to grant admin permissions. If you don't have an existing Microsoft Entra group, you can create one using the [`az ad group create`](/cli/azure/ad/group#az_ad_group_create) command.
30+
- To create or update a Kubernetes cluster, you need the **Azure Kubernetes Service Arc Contributor** role.
31+
- To access the Kubernetes cluster directly using the [`az aksarc get-credentials`](/cli/azure/aksarc#az-aksarc-get-credentials) command and download the kubeconfig file, you need the **Microsoft.HybridContainerService/provisionedClusterInstances/listUserKubeconfig/action**, which is included in the **Azure Kubernetes Service Arc Cluster User** role permission.
32+
- Once your Microsoft Entra group is enabled with admin access to your AKS cluster, this Microsoft Entra group can interact with Kubernetes clusters. You must install [**kubectl**](https://kubernetes.io/docs/tasks/tools/) and [**kubelogin**](https://azure.github.io/kubelogin/install.html).
33+
- Integration can't be disabled once added. You can still use [`az aksarc update`](/cli/azure/aksarc#az-aksarc-update) to update the `aad-admin-group-object-ids` if needed.
34+
35+
## Enable Microsoft Entra authentication for Kubernetes cluster
36+
37+
### Create a new cluster with Microsoft Entra authentication
38+
39+
1. Create an Azure resource group using the [`az group create`](/cli/azure/group#az-group-create) command:
40+
41+
```azurecli
42+
az group create --name $resource_group --location centralus
43+
```
44+
45+
1. Create an AKS Arc cluster and enable admin access for your Microsoft Entra group using the `--aad-admin-group-object-ids` parameter in the [`az aksarc create`](/cli/azure/aksarc#az-aksarc-create) command:
46+
47+
```azurecli
48+
az aksarc create -n $aks_cluster_name -g $resource_group --custom-location $customlocationID --vnet-ids $logicnetId --aad-admin-group-object-ids $aadgroupID --generate-ssh-keys --control-plane-ip $controlplaneIP
49+
```
50+
51+
### Use an existing cluster with Microsoft Entra authentication
52+
53+
Enable Microsoft Entra authentication on your existing Kubernetes cluster using the `--aad-admin-group-object-ids` parameter in the [`az aksarc update`](/cli/azure/aksarc#az-aksarc-update) command. Make sure to set your admin group to retain access on your cluster:
54+
55+
```azurecli
56+
az aksarc update -n $aks_cluster_name -g $resource_group --aad-admin-group-object-ids $aadgroupID
57+
```
58+
59+
## Access your Microsoft Entra-enabled cluster
60+
61+
1. Get the user credentials to access your cluster using the [`az aksarc get-credentials`](/cli/azure/aksarc#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 permission:
62+
63+
```azurecli
64+
az aksarc get-credentials --resource-group $resource_group --name $aks_cluster_name
65+
```
66+
67+
1. View the nodes in the cluster with the `kubectl get nodes` command and follow the instructions to sign in. You need to be in the Microsoft Entra ID group specified with the AKS cluster when you pass the `--aad-admin-group-object-ids $aadgroupID` parameter:
68+
69+
```azurecli
70+
kubectl get nodes
71+
```
72+
73+
## Next steps
74+
75+
- [Access and identity options for AKS enabled by Azure Arc](concepts-security-access-identity.md)
76+
- [Microsoft Entra integration with Kubernetes RBAC](kubernetes-rbac-23h2.md)
77+
- [Use Azure role-based access control (RBAC) for Kubernetes authorization](azure-rbac-23h2.md)

AKS-Hybrid/known-issues-installation.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ metadata:
88
ms.subservice: aks-hci
99
ms.custom: devx-track-azurepowershell
1010
ms.topic: faq
11-
ms.date: 07/11/2024
11+
ms.date: 07/26/2024
1212
title: Resolve issues and errors during an AKS Arc installation
1313
summary: |
1414
**Applies to: AKS on Azure Stack HCI, AKS on Windows Server**
@@ -522,7 +522,28 @@ sections:
522522
This error indicates that the cloud service's IP address is not a part of the cluster network and doesn't match any of the cluster networks that have the `client and cluster communication` role enabled.
523523
524524
To resolve this issue, run [Get-ClusterNetwork](/powershell/module/failoverclusters/get-clusternetwork?view=windowsserver2019-ps&preserve-view=true) where `Role` equals `ClusterAndClient`. Then, on one of the cluster nodes, select the name, address, and address mask to verify that the IP address provided for the `-cloudServiceIP` parameter of [New-AksHciNetworkSetting](./reference/ps/new-akshcinetworksetting.md) matches one of the displayed networks.
525-
525+
- question: |
526+
The Enable-AksHciArcConnection cmdlet generates a warning indicating that GetServicePrincipals has insufficient privileges to enable custom locations
527+
528+
answer: |
529+
`Enable-AksHciArcConnection` can connect an AKS cluster to Azure, but it shows the following warning when the customer uses a service principal for authentication:
530+
531+
```shell
532+
WARNING: Error occurred while executing GetServicePrincipals
533+
Code: Authorization_RequestDenied
534+
Message: Insufficient privileges to complete the operation.
535+
RequestId: <removed>
536+
DateTimeStamp: <removed>
537+
HttpStatusCode: Forbidden
538+
HttpStatusDescription: Forbidden
539+
HttpResponseStatus: Completed
540+
WARNING: Custom locations has not been enabled on the AKS-HCI cluster. To enable custom locations manually, visit aka.ms/enable-custom-location
541+
```
542+
543+
The current behavior of Arc onboarding is to enable custom locations by default. To enable custom locations, the **GetServicePrincipals** action is performed in the context of the logged-in Azure user. If the user (or SPN) does not have sufficient permissions to be able to do this, the command issues a warning that these permissions don't exist, and therefore the Custom Locations feature won't be enabled.
544+
545+
If you don't want Custom Locations to be enabled, you can safely ignore this warning, as this does not affect cluster onboarding to Arc. On the other hand, if you do need Custom Locations to be enabled, you must grant the necessary permissions to the user (or SPN).
546+
526547
527548
additionalContent: |
528549
## Next steps

0 commit comments

Comments
 (0)