Skip to content

Commit 9b86d1e

Browse files
Merge pull request #3575 from MicrosoftDocs/main638787097259164706sync_temp
For protected branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents a538cd6 + 70ba880 commit 9b86d1e

File tree

9 files changed

+251
-23
lines changed

9 files changed

+251
-23
lines changed

AKS-Arc/TOC.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@
133133
href: kubernetes-monitor-object-events.md
134134
- name: Get kubelet logs
135135
href: aks-get-kubelet-logs.md
136+
- name: Monitor control plane metrics
137+
href: control-plane-metrics.md
136138
- name: Enable Container Insights
137139
href: /azure/azure-monitor/containers/kubernetes-monitoring-enable
138140
- name: Monitor Kubernetes audit events
@@ -331,6 +333,8 @@
331333
href: vnet.yml
332334
- name: AKS on Windows Server
333335
items:
336+
- name: AKS on Windows Server retirement
337+
href: aks-windows-server-retirement.md
334338
- name: Overview
335339
href: overview.md
336340
- name: System requirements
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
title: Retirement of AKS architecture on Windows Server 2019 and Windows Server 2022
3+
description: Learn about retirement of AKS on Windows Server 2019 and Windows Server 2022.
4+
ms.topic: how-to
5+
ms.custom: linux-related-content
6+
author: sethmanheim
7+
ms.author: sethm
8+
ms.date: 03/26/2025
9+
10+
# Intent: As an IT Pro, I want to move my workloads from AKS on Windows Server to the latest version of AKS on Azure Local.
11+
# Keyword: retirement
12+
---
13+
14+
# Announcing the 3-year retirement of AKS on Windows Server current architecture
15+
16+
AKS enabled by Azure Arc uses Azure Arc to create new Kubernetes clusters on Azure Local directly from Azure. It enables you to use familiar tools such as the Azure portal, Azure CLI, Azure Resource Manager, and Bicep and Terraform templates to create and manage your Kubernetes clusters running on Azure Local. Microsoft continues to focus on delivering consistent user experience for all your AKS clusters. To continue ensuring Azure remains the best possible experience with the highest standards of safety and reliability, **we are retiring the current architecture of AKS on Windows Server 2019 and AKS on Windows Server 2022 in 3 years, on March 27, 2028**.
17+
18+
## What is AKS on Azure Local?
19+
20+
AKS on Azure Local uses Azure Arc to create new Kubernetes clusters on Azure Local directly from Azure. Since clusters are automatically connected to Azure Arc when they're created, you can use your Microsoft Entra ID for connecting to your clusters from anywhere. This ensures your developers and application operators can provision and configure Kubernetes clusters in accordance with company policies.
21+
22+
The following Kubernetes cluster deployment and management capabilities are available:
23+
24+
- **Pricing**: AKS is now included in Azure Local pricing, effective January 2025. This means that you only need to pay for Azure Local. There are no separate costs for running AKS clusters, including Linux and Windows node pools.
25+
- **Simplified infrastructure deployment on Azure Local**. Infrastructure components of AKS Arc like Arc Resource Bridge, Custom Location and the Kubernetes Extension for the AKS Arc operator, are all deployed as part of the Azure Local. The whole lifecycle management of AKS Arc infrastructure follows the same approach as the other components on Azure Local.
26+
- **Cloud-based management**: Create and manage Kubernetes clusters on Azure Local with familiar tools such as the Azure portal, Azure CLI, Azure Resource Manager, and Bicep and Terraform templates.
27+
- **Arc Gateway integration**: Deploy AKS Arc clusters with pod-level Arc Proxy and communicate with the Arc gateway, reducing the list of outbound URLs to configure in an isolated network environment.
28+
- **Integration with Entra ID and Azure RBAC**: Enable Azure RBAC for Kubernetes while creating AKS Arc clusters. Deploy AKS Arc clusters with workload identity enabled and deploy application pods with the workload identity label to access Microsoft Entra ID protected resources, such as Azure Key Vault.
29+
- **Support for NVIDIA T4**: Create Linux node pools in new VM sizes with GPU NVIDIA T4.
30+
- **K8s Audit Logs**: Export audit logs and other control plane logs to one or more destinations.
31+
- **Improved certificate management**: Shut down AKS Arc clusters for up to 7 days without any certificate expiration issues. Automatically repair certificates, managed by cert-tattoo, that expired when the cluster was shut down.
32+
33+
## If you're using Azure Kubernetes Service on Windows Server 2019 or Windows Server 2022
34+
35+
The Azure Kubernetes Service current architecture on Windows Server 2019 and Windows Server 2022 will be retired on 27 March 2028. Starting on March 27 2028, you no longer get support, security and quality updates for your existing Azure Kubernetes Service clusters. Additionally, you won't be able to deploy, upgrade or scale the current architecture of Azure Kubernetes Service on Windows Server 2019 and Windows Server 2022.
36+
37+
## If you're using Azure Kubernetes Service on Azure Local, version 22H2
38+
39+
If you're using AKS on Azure Local, version 22H2, be aware that Azure Local, version 22H2 will reach end of service on May 31 2025. After that, you won't receive monthly security and quality updates that provide protection from the latest security threats. To continue receiving updates, we recommend updating to the latest version of Azure Local.
40+
41+
## Deploy AKS on Azure Local, version 23H2 or later
42+
43+
### [From Windows Server 2019, 2022](#tab/ws)
44+
45+
AKS on Azure Local has a dependency on deploying a supported version of Azure Local. This means that local, PowerShell, or Windows Admin Center commands such as `Update-AksHciCluster` that worked on Windows Server don't work on Azure Local, version 23H2 or later, since AKS deployments on Azure Local, version 23H2 or later are managed via Azure Resource Manager (Azure CLI, Azure portal, etc.).
46+
47+
#### Evaluate if Azure Local is right for you
48+
49+
[Compare Windows Server](/azure/azure-local/concepts/compare-windows-server) explains key differences between Azure Local and Windows Server and provides guidance on when to use each. Both products are actively supported and maintained by Microsoft. Many organizations choose to deploy both, as they are intended for different and complementary purposes.
50+
51+
#### Uninstall AKS on Windows Server
52+
53+
Before you move to Azure Local, follow these steps to disconnect AKS workload clusters from Azure Arc and then uninstall AKS:
54+
55+
- Identify all your Arc-connected AKS workload clusters, and then [disconnect your AKS workload clusters from Azure Arc](connect-to-arc.md#disconnect-your-aks-cluster-from-azure-arc)
56+
- Uninstall AKS using [`Uninstall-AksHci`](/azure/aks/aksarc/reference/ps/uninstall-akshci). This removes all AKS-related configuration from Windows Server.
57+
58+
#### Deploy a supported version of Azure Local
59+
60+
[Deploy Azure Local from Azure portal or an Azure Resource Manager template](/azure/azure-local/deploy/deployment-introduction).
61+
62+
#### Deploy an AKS cluster on Azure Local
63+
64+
- [Review the networking pre-requisites](aks-hci-network-system-requirements.md) for deploying AKS on Azure Local.
65+
- [Deploy an AKS cluster on Azure Local using Az CLI, Azure portal and ARM templates, etc.](aks-create-clusters-cli.md).
66+
67+
### [From Azure Local, version 22H2](#tab/22H2)
68+
69+
AKS on Azure Local has a dependency on deploying a supported version of Azure Local. This means that local, PowerShell, or Windows Admin Center commands such as `Update-AksHciCluster` that worked on Azure Local, version 22H2 don't work on Azure Local, version 23H2 or later, since AKS deployments on Azure Local, version 23H2 or later are managed via Azure Resource Manager (Az CLI, Azure portal, etc).
70+
71+
#### Uninstall AKS on Azure Local, version 22H2
72+
73+
Before you upgrade to a supported version of Azure Local, follow these steps to disconnect AKS workload clusters from Azure Arc and then uninstall AKS:
74+
75+
- Identify all your Arc-connected AKS workload clusters, and then [disconnect your AKS workload clusters from Azure Arc](connect-to-arc.md#disconnect-your-aks-cluster-from-azure-arc)
76+
- Uninstall AKS using [`Uninstall-AksHci`](/azure/aks/aksarc/reference/ps/uninstall-akshci). This removes all AKS-related configuration from Windows Server.
77+
78+
#### Upgrade to a supported version of Azure Local
79+
80+
[Upgrade Azure Local 22H2 to a supported version of Azure Local](/azure/azure-local/upgrade/about-upgrades-23h2).
81+
82+
#### Deploy an AKS cluster on Azure Local
83+
84+
- [Review the networking pre-requisites](aks-hci-network-system-requirements.md) for deploying AKS on Azure Local.
85+
- [Deploy an AKS cluster on Azure Local using Az CLI, Azure portal and ARM templates, etc.](aks-create-clusters-cli.md).
86+
87+
---
88+
89+
## Next steps
90+
91+
- [Compare AKS deployment options](https://techcommunity.microsoft.com/blog/azurearcblog/comparing-feature-sets-for-aks-enabled-by-azure-arc-deployment-options/4188163).
92+
- [Compare Windows Server with Azure Local](/azure/azure-local/concepts/compare-windows-server)

AKS-Arc/control-plane-metrics.md

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
---
2+
title: Monitor control plane metrics
3+
description: Learn how to enable and query control plane metrics from AKS on Azure Local 23H2.
4+
ms.date: 03/26/2025
5+
ms.topic: how-to
6+
author: sethmanheim
7+
ms.author: sethm
8+
ms.reviewer: haojiehang
9+
10+
---
11+
12+
# Monitor control plane metrics
13+
14+
[!INCLUDE [hci-applies-to-23h2](includes/hci-applies-to-23h2.md)]
15+
16+
This article describes how to enable and query control plane metrics from AKS on Azure Local 23H2. The workflow is as follows:
17+
18+
- Enable Managed Prometheus extension
19+
- Enable control plane metrics
20+
- (Optional) view metrics in Grafana
21+
22+
Control plane metrics provide critical visibility into the availability and performance of Kubernetes control plane components, such as the API server, scheduler, or controller manager. You can use these metrics to maximize observability and maintain operational excellence for your cluster.
23+
24+
## Prerequisites
25+
26+
Before you begin, make sure the following prerequisites are met:
27+
28+
- A running AKS on Azure Local instance.
29+
- Install the latest version of the **aksarc****connectedk8s**, and **k8s-extension** CLI extensions.
30+
- [Download and install **kubectl**](https://kubernetes.io/docs/tasks/tools/) on your development machine.  
31+
- [Understand the basics of Prometheus Query Language](https://prometheus.io/docs/prometheus/latest/querying/examples/).
32+
- [Understand the basics of Kubernetes system component metrics](https://kubernetes.io/docs/concepts/cluster-administration/system-metrics/).
33+
34+
## Enable Managed Prometheus extension
35+
36+
Azure Monitor collects and aggregates important metrics from your AKS Arc running on Azure Local instance. In addition to [platform metrics](kubernetes-monitor-metrics.md#metrics) collected from your cluster, you can view granular Kubernetes metrics using the managed Prometheus extension. This extension collects Prometheus metrics from your deployment and stores them in an Azure Monitor workspace in Azure. Once they are ingested, you can analyze them in Metrics Explorer or use prebuilt dashboards in Azure Managed Grafana.
37+
38+
### Step 1: Install the managed Prometheus extension
39+
40+
You can install the extension either from the Azure portal, or using CLI.
41+
42+
# [Azure portal](#tab/azureportal)
43+
44+
Go to your Kubernetes instance, then select **Monitoring > Insights > Monitor Settings**:
45+
46+
:::image type="content" source="media/control-plane-metrics/monitor-settings.png" alt-text="Screenshot of portal showing monitor settings." lightbox="media/control-plane-metrics/monitor-settings.png":::
47+
48+
#### [Azure CLI](#tab/azurecli)
49+
50+
The following command installs the managed Prometheus extension with a default Azure Monitor workspace:
51+
52+
```azurecli
53+
az k8s-extension create --name azuremonitor-metrics --cluster-name <cluster-name> --resource-group <resource-group> --cluster-type connectedClusters --extension-type Microsoft.AzureMonitor.Containers.Metrics
54+
```
55+
56+
---
57+
58+
See the [guidance for the managed Prometheus extension onboarding](/azure/azure-monitor/containers/kubernetes-monitoring-enable?tabs=cli#enable-prometheus-and-grafana).
59+
60+
### Step 2: Verify extension and metrics pod deployment
61+
62+
To verify the extension installation, you can run `az connectedk8s proxy` to connect to the cluster and use **kubectl** to list the metrics pods. The pods should start with the name **ama-metrics-** and are in a running state.
63+
64+
```azurecli
65+
kubectl get pods -n kube-system
66+
```
67+
68+
The output of the command is similar to the following:
69+
70+
```output
71+
NAME READY STATUS RESTARTS AGE
72+
akshci-telemetry-5df56fd5-s5wtm 1/1 Running 1 (37h ago) 44d
73+
ama-logs-nqf9h 3/3 Running 0 5h29m
74+
ama-logs-pvvb2 3/3 Running 2 (5h21m ago) 5h29m
75+
ama-logs-rs-86bc9dd898-4p7pv 2/2 Running 0 5h29m
76+
**ama-metrics-98bb54876-dndrh** 2/2 Running 2 (3h33m ago) 5h30m
77+
**ama-metrics-ksm-6544c98f5f-ph6sp** 1/1 Running 0 5h30m
78+
**ama-metrics-node-6dl7p** 2/2 Running 2 (3h33m ago) 5h30m
79+
**ama-metrics-node-ztwzt** 2/2 Running 1 (3h33m ago) 5h30m
80+
….
81+
```
82+
83+
## Enable control plane metrics with custom configuration
84+
85+
After you enable the extension, you can view Prometheus Metrics from [targets scraped by default](/azure/azure-monitor/containers/prometheus-metrics-scrape-default#targets-scraped-by-default) in the Azure Monitor workspace. The [default ON targets](/azure/azure-monitor/containers/prometheus-metrics-scrape-configuration-minimal#minimal-ingestion-for-default-on-targets) include kubelet, kube-state-metrics, node-exporter, etc. To get started with kubelet metrics, use the PromQL below:
86+
87+
```bash
88+
kubelet_running_pods{cluster="<cluster_name>", instance="<instance_name>", job="kubelet"}
89+
```
90+
91+
:::image type="content" source="media/control-plane-metrics/metrics.png" alt-text="Screenshot showing metrics query." lightbox="media/control-plane-metrics/metrics.png":::
92+
93+
To view control plane metrics such as APIServer and ETCD, you can customize the scraping of Prometheus metrics by applying the config maps to your cluster. The metrics pods pick up the config maps and pods restart in 2-3 minutes. Follow these steps to enable.
94+
95+
### Step 1: connect to Kubernetes
96+
97+
Connect to your cluster using `az connectedk8s proxy` and run `kubectl get pods -A` to make sure you're connected.
98+
99+
### Step 2: download the configuration files and review the content
100+
101+
Managed Prometheus uses an [agent-based solution](https://github.com/Azure/prometheus-collector) to collect Prometheus metrics and send them to the Azure Monitor workspace. There are two configuration files to download and review: **ama-metrics-settings-configmap.yaml** and **ama-metrics-prometheus-config-configmap.yaml**. For more information about customizing metrics scraping using configuration files, see [Customize scraping of Prometheus metrics](/azure/azure-monitor/containers/prometheus-metrics-scrape-configuration).
102+
103+
- To enable **APIServer** metrics, modify the value of `apiserver` under the default OFF targets and set it to **true** in **ama-metrics-settings-configmap.yaml**. For the list of metrics, see [minimal ingestion for default OFF targets](/azure/azure-monitor/containers/prometheus-metrics-scrape-configuration-minimal#minimal-ingestion-for-default-off-targets).
104+
- To enable metrics from components not listed under default OFF targets such as **ETCD, Controller Manager, Kube Scheduler**, add a new scraping job in **ama-metrics-prometheus-config-configmap.yaml**.
105+
106+
[You can download](https://github.com/Azure/aksArc/tree/main/scripts/ControlPlaneMetrics) these two configuration files to your local machine and review the content before going to the next step.
107+
108+
### Step 3: apply custom configuration files
109+
110+
Run the following commands to apply the changes, then wait several minutes for the metrics pods to restart.
111+
112+
```bash
113+
kubectl apply -f ama-metrics-settings-configmap.yaml
114+
kubectl apply -f ama-metrics-prometheus-config-configmap.yaml
115+
```
116+
117+
### Step 4: query metrics in Azure Monitor workspace
118+
119+
Go to the linked **Azure Monitor Workspace > Metric Explorer** and use PromQL to validate that the metrics are ingested. In the following sample query, it shows a stable kube-scheduler metrics `scheduler_schedule_attempts_total` from a specific Kubernetes cluster.
120+
121+
:::image type="content" source="media/control-plane-metrics/metrics-ingested.png" alt-text="Screenshot of portal showing metrics ingestion." lightbox="media/control-plane-metrics/metrics-ingested.png":::
122+
123+
## View metrics in Grafana
124+
125+
Metrics Explorer is convenient for metrics validation. To operationalize Kubernetes monitoring with Azure Monitor, it's recommended that you monitor the metrics using Azure Managed Grafana.
126+
127+
### Step 1: install Azure Managed Grafana
128+
129+
[Follow these instructions](/azure/managed-grafana/how-to-connect-azure-monitor-workspace) to create a Grafana workspace, link to an Azure Monitor workspace, and view the metrics in Grafana dashboards. You can view the dashboard under **Monitoring > Insights > Monitor Settings**. Multiple instances can be linked to the same Azure Monitor workspace, so make sure to choose the right dashboard.
130+
131+
### Step 2: import a prebuilt dashboard for control plane metrics
132+
133+
[Download the API server dashboard ](https://grafana.com/grafana/dashboards/20331-kubernetes-api-server/) to your local machine, copy the JSON content, then import it to the managed Grafana dashboard.
134+
135+
:::image type="content" source="media/control-plane-metrics/dashboards.png" alt-text="Screenshot showing metrics dashboard." lightbox="media/control-plane-metrics/dashboards.png":::
136+
137+
### Step 3: view metrics in the dashboard
138+
139+
Ensure that the data source and cluster names are correct. You can view the metrics in Grafana and customize them as needed.
140+
141+
:::image type="content" source="media/control-plane-metrics/metrics-status.png" alt-text="Screenshot showing control plane metrics status." lightbox="media/control-plane-metrics/metrics-status.png":::
142+
143+
## Next steps
144+
145+
- [AKS Arc monitoring data reference](kubernetes-monitor-metrics.md)
146+
- [Prometheus scrape configuration](/azure/azure-monitor/containers/prometheus-metrics-scrape-configuration)
Loading
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)