You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-monitor/insights/container-insights-livedata-setup.md
+23-14Lines changed: 23 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,26 +1,27 @@
1
1
---
2
-
title: Setup Azure Monitor for containers Live Data (preview) | Microsoft Docs
3
-
description: This article describes how to setup the real-time view of container logs (stdout/stderr) and events without using kubectl with Azure Monitor for containers.
2
+
title: Set up Azure Monitor for containers Live Data (preview) | Microsoft Docs
3
+
description: This article describes how to set up the real-time view of container logs (stdout/stderr) and events without using kubectl with Azure Monitor for containers.
4
4
ms.topic: conceptual
5
-
ms.date: 10/16/2019
5
+
ms.date: 02/14/2019
6
6
7
7
---
8
8
9
-
# How to setup the Live Data (preview) feature
9
+
# How to set up the Live Data (preview) feature
10
10
11
-
To view Live Data (preview) with Azure Monitor for containers from Azure Kubernetes Service (AKS) clusters, you need to configure authentication to grant permission to access to your Kubernetes data. This security configuration allows realtime access to your data through the Kubernetes API directly in the Azure portal.
11
+
To view Live Data (preview) with Azure Monitor for containers from Azure Kubernetes Service (AKS) clusters, you need to configure authentication to grant permission to access to your Kubernetes data. This security configuration allows real-time access to your data through the Kubernetes API directly in the Azure portal.
12
12
13
-
This feature supports three different methods to control access to the logs, events, and metrics:
13
+
This feature supports the following methods to control access to the logs, events, and metrics:
14
14
15
15
- AKS without Kubernetes RBAC authorization enabled
16
16
- AKS enabled with Kubernetes RBAC authorization
17
+
- AKS configured with the cluster role binding **[clusterMonitoringUser](https://docs.microsoft.com/rest/api/aks/managedclusters/listclustermonitoringusercredentials?view=azurermps-5.2.0)**
17
18
- AKS enabled with Azure Active Directory (AD) SAML-based single-sign on
18
19
19
20
These instructions require both administrative access to your Kubernetes cluster, and if configuring to use Azure Active Directory (AD) for user authentication, administrative access to Azure AD.
20
21
21
22
This article explains how to configure authentication to control access to the Live Data (preview) feature from the cluster:
22
23
23
-
- Rolebased access control (RBAC) enabled AKS cluster
24
+
- Role-based access control (RBAC) enabled AKS cluster
24
25
- Azure Active Directory integrated AKS cluster.
25
26
26
27
>[!NOTE]
@@ -31,7 +32,7 @@ This article explains how to configure authentication to control access to the L
31
32
32
33
## Authentication model
33
34
34
-
The Live Data (preview) features utilizes the Kubernetes API, identical to the `kubectl` command-line tool. The Kubernetes API endpoints utilize a self-signed certificate, which your browser will be unable to validate. This feature utilizes a internal proxy to validate the certificate with the AKS service, ensuring the traffic is trusted.
35
+
The Live Data (preview) features utilizes the Kubernetes API, identical to the `kubectl` command-line tool. The Kubernetes API endpoints utilize a self-signed certificate, which your browser will be unable to validate. This feature utilizes an internal proxy to validate the certificate with the AKS service, ensuring the traffic is trusted.
35
36
36
37
The Azure portal prompts you to validate your login credentials for an Azure Active Directory cluster, and redirect you to the client registration setup during cluster creation (and re-configured in this article). This behavior is similar to the authentication process required by `kubectl`.
37
38
@@ -41,13 +42,21 @@ The Azure portal prompts you to validate your login credentials for an Azure Act
41
42
>[!IMPORTANT]
42
43
>Users of this features requires [Azure Kubernetes Cluster User Role](../../azure/role-based-access-control/built-in-roles.md#azure-kubernetes-service-cluster-user-role permissions) to the cluster in order to download the `kubeconfig` and use this feature. Users do **not** require contributor access to the cluster to utilize this feature.
43
44
45
+
## Using clusterMonitoringUser with RBAC-enabled clusters
46
+
47
+
To eliminate the need to apply additional configuration changes to allow the Kubernetes user rule binding **clusterUser** access to the Live Data (preview) feature after [enabling RBAC](#configure-kubernetes-rbac-authorization) authorization, AKS has added a new Kubernetes cluster role binding called **clusterMonitoringUser**. This cluster role binding has all the necessary permissions out-of-the-box to access the Kubernetes API and the endpoints for utilizing the Live Data (preview) feature.
48
+
49
+
In order to utilize the Live Data (preview) feature with this new user, you need to be a member of the [Contributor](../../role-based-access-control/built-in-roles.md#contributor) role on the AKS cluster resource. Azure Monitor for containers, when enabled, is configured to authenticate using this user by default. If the clusterMonitoringUser role binding does not exist on a cluster, **clusterUser** is used for authentication instead.
50
+
51
+
AKS released this new role binding in January 2020, so clusters created before January 2020 do not have it. If you have a cluster that was created before January 2020, the new **clusterMonitoringUser** can be added to an existing cluster by performing a PUT operation on the cluster, or performing any other operation on the cluster tha performs a PUT operation on the cluster, such as updating the cluster version.
52
+
44
53
## Kubernetes cluster without RBAC enabled
45
54
46
-
If you have a Kubernetes cluster that is not configured with Kubernetes RBAC authorization or integrated with Azure AD single-sign on, you do not need to follow these steps. This is because you have administrative permissions by default in an non-RBAC configuration.
55
+
If you have a Kubernetes cluster that is not configured with Kubernetes RBAC authorization or integrated with Azure AD single-sign on, you do not need to follow these steps. This is because you have administrative permissions by default in a non-RBAC configuration.
47
56
48
-
## Configure Kubernetes RBAC authentication
57
+
## Configure Kubernetes RBAC authorization
49
58
50
-
When you enable Kubernetes RBAC authorization, two users are utilized: **clusterUser** and **clusterAdmin** to access the Kubernetes API. This is similar to running `az aks get-credentials -n {cluster_name} -g {rg_name}` without the administrative option. This means the **clusterUser**has to be granted access to the end points in Kubernetes API.
59
+
When you enable Kubernetes RBAC authorization, two users are utilized: **clusterUser** and **clusterAdmin** to access the Kubernetes API. This is similar to running `az aks get-credentials -n {cluster_name} -g {rg_name}` without the administrative option. This means the **clusterUser**needs to be granted access to the end points in Kubernetes API.
51
60
52
61
The following example steps demonstrate how to configure cluster role binding from this yaml configuration template.
53
62
@@ -88,11 +97,11 @@ The following example steps demonstrate how to configure cluster role binding fr
88
97
>[!NOTE]
89
98
> If you have applied a previous version of the `LogReaderRBAC.yaml` file to your cluster, update it by copying and pasting the new code shown in step 1 above, and then run the command shown in step 2 to apply it to your cluster.
90
99
91
-
## Configure ADintegrated authentication
100
+
## Configure AD-integrated authentication
92
101
93
102
An AKS cluster configured to use Azure Active Directory (AD) for user authentication utilizes the login credentials of the person accessing this feature. In this configuration, you can sign in to an AKS cluster by using your Azure AD authentication token.
94
103
95
-
Azure AD client registration must be reconfigured to allow the Azure portal to redirect authorization pages as a trusted redirect URL. Users from Azure AD are then granted access directly to the same Kubernetes API endpoints through **ClusterRoles** and **ClusterRoleBindings**.
104
+
Azure AD client registration must be re-configured to allow the Azure portal to redirect authorization pages as a trusted redirect URL. Users from Azure AD are then granted access directly to the same Kubernetes API endpoints through **ClusterRoles** and **ClusterRoleBindings**.
96
105
97
106
For more information on advanced security setup in Kubernetes, review the [Kubernetes documentation](https://kubernetes.io/docs/reference/access-authn-authz/rbac/).
98
107
@@ -120,7 +129,7 @@ For more information on advanced security setup in Kubernetes, review the [Kuber
120
129
121
130
## Grant permission
122
131
123
-
Each Azure AD account must be granted permission to the appropriate APIs in Kubernetes in order to access the Live Data (preview) feature. The steps to grant the Azure Active Directory account are similar to the steps described in the [Kubernetes RBAC authentication](#configure-kubernetes-rbac-authentication) section. Before applying the yaml configuration template to your cluster, replace **clusterUser** under **ClusterRoleBinding** with the desired user.
132
+
Each Azure AD account must be granted permission to the appropriate APIs in Kubernetes in order to access the Live Data (preview) feature. The steps to grant the Azure Active Directory account are similar to the steps described in the [Kubernetes RBAC authentication](#configure-kubernetes-rbac-authorization) section. Before applying the yaml configuration template to your cluster, replace **clusterUser** under **ClusterRoleBinding** with the desired user.
124
133
125
134
>[!IMPORTANT]
126
135
>If the user you grant the RBAC binding for is in the same Azure AD tenant, assign permissions based on the userPrincipalName. If the user is in a different Azure AD tenant, query for and use the objectId property.
0 commit comments