啟用 Kubernetes 叢集的監視
本文說明如何使用下列 Azure 監視器功能,啟用 Kubernetes 叢集的完整監視:
- 計量集合的受控 Prometheus
- 記錄收集的容器深入解析
- 視覺效果的受控 Grafana。
使用 Azure 入口網站,您可以同時啟用所有功能。 您也可以使用 Azure CLI、Azure Resource Manager 範本、Terraform 或 Azure 原則個別啟用。 本文說明每個方式。
重要
Kubernetes 叢集會產生大量的記錄數據,如果您不選擇性地瞭解所收集的記錄,可能會導致大量成本。 啟用叢集監視之前,請參閱下列文章,以確保您的環境已針對成本進行優化,而且您只會將記錄收集限制為所需的數據:
- 使用數據收集規則在容器深入解析中設定數據收集和成本優化
啟用監視之後,自定義記錄收集的詳細數據,包括使用預設的成本優化組態。 - 使用 Azure 監視器監視 Kubernetes 的最佳做法
監視由 Azure 架構良好架構架構五大要素所組織的 Kubernetes 叢集的最佳做法,包括成本優化。 - Azure 監視器中的成本優化
設定 Azure 監視器所有功能的最佳做法,以將成本優化,並限制您收集的數據量。
支援的叢集
本文提供下列叢集類型的上線指引。 相關區段中會指出每個類型之程式的任何差異。
必要條件
權限
受控 Prometheus 必要條件
- 叢集必須使用受控識別驗證。
- 下列資源提供者必須在 AKS 叢集和 Azure 監視器工作區的訂用帳戶中註冊:
- Microsoft.ContainerService
- Microsoft.Insights
- Microsoft.AlertsManagement
- Microsoft.Monitor
- 下列資源提供者必須在 Grafana 工作區訂用帳戶的訂用帳戶中註冊:
- Microsoft.Dashboard
已啟用 Arc 的 Kubernetes 叢集必要條件
- 已啟用 Azure Arc 的 Kubernetes 叢集擴充功能的必要條件。
- 除了已啟用 Azure Arc 的 Kubernetes 網路需求之外,請確認防火牆需求。
- 如果您先前已安裝適用於 AKS 的監視,請先確定您已停用監視,再繼續以避免在延伸模組安裝期間發生問題。
- 如果您先前使用不含叢集延伸模組的腳本在叢集上安裝監視,請遵循停用 Kubernetes 叢集監視的指示,刪除此 Helm 圖表。
注意
Managed Prometheus 已啟用 Arc 的 Kubernetes 擴充功能不支援下列設定:
- Red Hat Openshift 散發套件
- Windows 節點
工作區
下表描述支援 Managed Prometheus 和容器深入解析所需的工作區。 您可以將每個工作區建立為上線程式的一部分,或使用現有的工作區。 請參閱設計Log Analytics工作區架構,以取得要建立的工作區數目和放置位置的指引。
功能 | 工作區 | 備註 |
---|---|---|
Managed Prometheus | Azure 監視器工作區 | Contributor 權限足以讓附加元件將資料傳送至 Azure 監視器工作區。 連結 Azure 監視器工作區以檢視 Azure 受控 Grafana 中的計量時,您將需要 Owner 層級權限。 這是必要的,因為執行上線步驟的使用者必須能夠提供 Azure 受控 Grafana 系統識別 Monitoring Reader 角色在 Azure 監視器工作區上查詢計量。 |
容器深入解析 | Log Analytics 工作區 | 您可以將 AKS 叢集連結至相同 Microsoft Entra 租用戶中不同 Azure 訂用帳戶中的 Log Analytics 工作區,但您必須使用 Azure CLI 或 Azure Resource Manager 範本。 您目前無法使用 Azure 入口網站執行此設定。 若您要將現有 AKS 叢集連線至另一個訂閱中的 Log Analytics 工作區,則必須在具有 Log Analytics 工作區的訂閱中註冊 Microsoft.ContainerService 資源提供者。 如需更多資訊,請參閱註冊資源業者。 如需要用於預設工作區的支援對應配對,請參閱容器深入解析支援的區域對應。 |
受控 Grafana | Azure 受控 Grafana 工作區 | 將 Grafana 工作區連結至 Azure 監視器工作區,讓從叢集收集的 Prometheus 計量可供 Grafana 儀表板使用。 |
啟用 Prometheus 和 Grafana
使用下列其中一種方法,從叢集抓取 Prometheus 計量,並讓受控 Grafana 將計量可視化。 如需連結 Azure 監視器工作區和 Azure 受控 Grafana 工作區的選項,請參閱連結 Grafana 工作區。
如果您未在下列命令中指定現有的 Azure 監視器工作區,則會使用資源群組的預設工作區。 若叢集區域中還沒有預設工作區,則名稱格式為 DefaultAzureMonitorWorkspace-<mapped_region>
的工作區將在名稱為 DefaultRG-<cluster_region>
的資源群組建立。
必要條件
- Az CLI 2.49.0 版或更新版本。
- 必須使用命令
az extension remove --name aks-preview
來從 AKS 叢集解除安裝 aks-preview 擴充功能。 - 必須使用命令
az extension add --name k8s-extension
安裝 k8s-extension 擴充功能。 - 需要 k8s 延伸版本 1.4.1 版或更新版本。
AKS cluster
使用 -enable-azure-monitor-metrics
選項 az aks create
或 az aks update
(視您要建立新的叢集或更新現有叢集而定) 來安裝會抓取 Prometheus 計量的計量附加元件。
範例命令
### Use default Azure Monitor workspace
az aks create/update --enable-azure-monitor-metrics -n <cluster-name> -g <cluster-resource-group>
### Use existing Azure Monitor workspace
az aks create/update --enable-azure-monitor-metrics -n <cluster-name> -g <cluster-resource-group> --azure-monitor-workspace-resource-id <workspace-name-resource-id>
### Use an existing Azure Monitor workspace and link with an existing Grafana workspace
az aks create/update --enable-azure-monitor-metrics -n <cluster-name> -g <cluster-resource-group> --azure-monitor-workspace-resource-id <azure-monitor-workspace-name-resource-id> --grafana-resource-id <grafana-workspace-name-resource-id>
### Use optional parameters
az aks create/update --enable-azure-monitor-metrics -n <cluster-name> -g <cluster-resource-group> --ksm-metric-labels-allow-list "namespaces=[k8s-label-1,k8s-label-n]" --ksm-metric-annotations-allow-list "pods=[k8s-annotation-1,k8s-annotation-n]"
已啟用 Arc 的叢集
### Use default Azure Monitor workspace
az k8s-extension create --name azuremonitor-metrics --cluster-name <cluster-name> --resource-group <resource-group> --cluster-type connectedClusters --extension-type Microsoft.AzureMonitor.Containers.Metrics
## Use existing Azure Monitor workspace
az k8s-extension create --name azuremonitor-metrics --cluster-name <cluster-name> --resource-group <resource-group> --cluster-type connectedClusters --extension-type Microsoft.AzureMonitor.Containers.Metrics --configuration-settings azure-monitor-workspace-resource-id=<workspace-name-resource-id>
### Use an existing Azure Monitor workspace and link with an existing Grafana workspace
az k8s-extension create --name azuremonitor-metrics --cluster-name <cluster-name> --resource-group <resource-group> --cluster-type connectedClusters --extension-type Microsoft.AzureMonitor.Containers.Metrics --configuration-settings azure-monitor-workspace-resource-id=<workspace-name-resource-id> grafana-resource-id=<grafana-workspace-name-resource-id>
### Use optional parameters
az k8s-extension create --name azuremonitor-metrics --cluster-name <cluster-name> --resource-group <resource-group> --cluster-type connectedClusters --extension-type Microsoft.AzureMonitor.Containers.Metrics --configuration-settings azure-monitor-workspace-resource-id=<workspace-name-resource-id> grafana-resource-id=<grafana-workspace-name-resource-id> AzureMonitorMetrics.KubeStateMetrics.MetricAnnotationsAllowList="pods=[k8s-annotation-1,k8s-annotation-n]" AzureMonitorMetrics.KubeStateMetrics.MetricLabelsAllowlist "namespaces=[k8s-label-1,k8s-label-n]"
任何命令都可使用下列選擇性參數:
- AKS:
--ksm-metric-annotations-allow-list
Arc:--AzureMonitorMetrics.KubeStateMetrics.MetricAnnotationsAllowList
在資源 kube_resource_annotations 計量中使用的 Kubernetes 註釋索引碼的逗號分隔清單。 例如,kube_pod_annotations 是 Pod 資源的註釋計量。 根據預設,計量只包含名稱和命名空間標籤。 若要包含更多註釋,請對於您會想要允許的註釋提供其複數形式和 Kubernetes 註釋索引碼的資源名稱清單。 您可以改為對於每個資源提供單一*
,允許任何註釋,但會產生嚴重的效能影響。 例如:pods=[kubernetes.io/team,...],namespaces=[kubernetes.io/team],...
。 - AKS:
--ksm-metric-labels-allow-list
Arc:--AzureMonitorMetrics.KubeStateMetrics.MetricLabelsAllowlist
以逗號分隔的更多 Kubernetes 標籤索引鍵清單,用於資源的 kube_resource_labels 計量 kube_resource_labels 計量。 例如,kube_pod_labels 是 Pod 資源的註釋計量。 根據預設此計量只包含名稱和命名空間標籤。 若要包含更多標籤,請以複數形式提供資源名稱清單,以及您想要允許它們的 Kubernetes 標籤索引鍵:每個資源都可以提供單一*
以允許任何標籤,但這具有嚴重的效能影響。 例如:pods=[app],namespaces=[k8s-label-1,k8s-label-n,...],...
。 - AKS:
--enable-windows-recording-rules
讓您啟用 Windows 儀表板正常運作所需的錄製規則群組。
啟用容器深入解析
使用下列其中一種方法,在您的叢集上啟用容器深入解析。 完成之後,請參閱設定容器深入解析的代理程序資料收集來自訂設定,以確保您不會收集比所需的更多資料。
使用下列其中一個命令來監視 AKS 和已啟用 Arc 的叢集。 如果您未指定現有的 Log Analytics 工作區,則會使用資源群組的預設工作區。 若叢集區域中還沒有預設工作區,則會使用格式為 DefaultWorkspace-<GUID>-<Region>
的名稱建立一個工作區。
必要條件
- Azure CLI 版本 2.43.0 版或更新版本
- CLI 2.49.0 版或更高版本中預設有受控識別驗證。
- Azure k8s 延伸版本 1.3.7 版或更新版本
- 受控識別驗證在 k8s-extension 1.43.0 版或更高版本中為預設。
- 已啟用 Arc 的 Kubernetes 叢集不支援使用 ARO(Azure Red Hat Openshift) 或 Windows 節點的受控識別驗證。 使用舊版驗證。
- 針對 CLI 2.54.0 版或更新版本,記錄結構描述將會使用 ConfigMap 設定為 ContainerLogV2。
AKS cluster
### Use default Log Analytics workspace
az aks enable-addons -a monitoring -n <cluster-name> -g <cluster-resource-group-name>
### Use existing Log Analytics workspace
az aks enable-addons -a monitoring -n <cluster-name> -g <cluster-resource-group-name> --workspace-resource-id <workspace-resource-id>
範例
az aks enable-addons -a monitoring -n "my-cluster" -g "my-resource-group" --workspace-resource-id "/subscriptions/my-subscription/resourceGroups/my-resource-group/providers/Microsoft.OperationalInsights/workspaces/my-workspace"
已啟用 Arc 的叢集
### Use default Log Analytics workspace
az k8s-extension create --name azuremonitor-containers --cluster-name <cluster-name> --resource-group <resource-group> --cluster-type connectedClusters --extension-type Microsoft.AzureMonitor.Containers
### Use existing Log Analytics workspace
az k8s-extension create --name azuremonitor-containers --cluster-name <cluster-name> --resource-group <resource-group> --cluster-type connectedClusters --extension-type Microsoft.AzureMonitor.Containers --configuration-settings logAnalyticsWorkspaceResourceID=<workspace-resource-id>
### Use managed identity authentication (default as k8s-extension version 1.43.0)
az k8s-extension create --name azuremonitor-containers --cluster-name <cluster-name> --resource-group <resource-group> --cluster-type connectedClusters --extension-type Microsoft.AzureMonitor.Containers --configuration-settings amalogs.useAADAuth=true
### Use advanced configuration settings
az k8s-extension create --name azuremonitor-containers --cluster-name <cluster-name> --resource-group <resource-group> --cluster-type connectedClusters --extension-type Microsoft.AzureMonitor.Containers --configuration-settings amalogs.resources.daemonset.limits.cpu=150m amalogs.resources.daemonset.limits.memory=600Mi amalogs.resources.deployment.limits.cpu=1 amalogs.resources.deployment.limits.memory=750Mi
### With custom mount path for container stdout & stderr logs
### Custom mount path not required for Azure Stack Edge version > 2318. Custom mount path must be /home/data/docker for Azure Stack Edge cluster with version <= 2318
az k8s-extension create --name azuremonitor-containers --cluster-name <cluster-name> --resource-group <resource-group> --cluster-type connectedClusters --extension-type Microsoft.AzureMonitor.Containers --configuration-settings amalogs.logsettings.custommountpath=<customMountPath>
檢視 Helm 圖表的資源要求和限制區段,以取得可用的組態設定。
範例
az k8s-extension create --name azuremonitor-containers --cluster-name "my-cluster" --resource-group "my-resource-group" --cluster-type connectedClusters --extension-type Microsoft.AzureMonitor.Containers --configuration-settings logAnalyticsWorkspaceResourceID="/subscriptions/my-subscription/resourceGroups/my-resource-group/providers/Microsoft.OperationalInsights/workspaces/my-workspace"
已啟用 Arc 的叢集與正向 Proxy
如果已將叢集設為正向 Proxy,則 Proxy 設定會自動套用至延伸模組。 如果是具有 AMPLS + Proxy 的叢集,應該忽略 Proxy 設定。 使用組態設定 amalogs.ignoreExtensionProxySettings=true
將延伸模組上線。
az k8s-extension create --name azuremonitor-containers --cluster-name <cluster-name> --resource-group <resource-group> --cluster-type connectedClusters --extension-type Microsoft.AzureMonitor.Containers --configuration-settings amalogs.ignoreExtensionProxySettings=true
使用 ARO 或 OpenShift 或 Windows 節點啟用 Arc 的叢集
已啟用 Arc 的 Kubernetes 叢集不支援使用 ARO(Azure Red Hat OpenShift) 或 OpenShift 或 Windows 節點的受控識別驗證。 如下列範例所示,請使用 amalogs.useAADAuth=false
舊版驗證。
az k8s-extension create --name azuremonitor-containers --cluster-name <cluster-name> --resource-group <resource-group> --cluster-type connectedClusters --extension-type Microsoft.AzureMonitor.Containers --configuration-settings amalogs.useAADAuth=false
刪除延伸模組執行個體
下列命令只會刪除延伸模組執行個體,但不會刪除 Log Analytics 工作區。 Log Analytics 資源內的資料會保持不變。
az k8s-extension delete --name azuremonitor-containers --cluster-type connectedClusters --cluster-name <cluster-name> --resource-group <resource-group>
使用 Azure 入口網站啟用完整監視
使用 Azure 入口網站,您可以同時啟用受控 Prometheus 和容器深入解析。
注意
如果您想要在沒有容器深入解析的情況下啟用受控 Prometheus,請從 Azure 監視器工作區加以啟用,如下所示。
新的 AKS 叢集 (Prometheus 和容器深入解析)
當您在 Azure 入口網站中建立新的 AKS 叢集時,您可以從 [整合] 索引標籤啟用 Prometheus、容器深入解析和 Grafana。在 [Azure 監視器] 區段中,如果您想要指定要使用的工作區,請選取 [預設組態] 或 [自定義設定]。 建立叢集之後,您可以執行其他設定。
現有叢集 (Prometheus 和容器深入解析)
此選項可在現有的 AKS 叢集上啟用容器深入解析,並選擇性地啟用 Prometheus 和 Grafana。
從叢集的功能表中選取 [深入解析],或從 [監視器] 功能表中選取 [容器],[未受監視的叢集]索引標籤,然後按一下叢集旁的 [啟用]。
- 如果未啟用叢集的容器深入解析,您會看到一個畫面,以識別已啟用哪些功能。 按一下設定監視。
- 如果叢集上已啟用容器深入解析,請選取 [監視設定] 按鈕來修改組態。
容器深入解析將會啟用。 如果您想要為叢集啟用 Prometheus 計量,請選取 [啟用 Prometheus 計量] 的核取方框,並 啟用 Grafana。 如果您有現有的 Azure 監視器工作區和 Grafana 工作區,則會為您選取。
按兩下 [進階設定] 選取替代工作區或建立新的工作區。 成本預設值設定可讓您修改預設集合詳細資料,以降低監視成本。 如需詳細資訊,請參閱在容器深入解析中啟用成本最佳化設定。
按一下 [設定] 儲存組態。
現有叢集 (僅限 Prometheus)
此選項可在叢集上啟用 Prometheus 計量,而不需要啟用容器深入解析。
在 Azure 入口網站中開啟 [Azure 監視器工作區] 功能表,並選取您的工作區。
在 [受控 Prometheus] 區段中選取 [受監視的叢集],以顯示 AKS 叢集清單。
選取您想要啟用的叢集旁的 [設定]。
現有叢集 (新增 Prometheus)
- 從 [監視器] 功能表中選取 [容器],[受監視的叢集] 索引標籤,然後按一下 [受控 Prometheus] 資料行中叢集旁的 [設定]。
啟用 Windows 計量集合 (預覽)
注意
windows-exporter-daemonset.yaml 中沒有 CPU/儲存體限制,因此可能會過度佈建 Windows 節點
如需詳細資訊,請參閱資源保留
當您部署工作負載時,請設定容器的資源儲存體和 CPU 限制。 這也會從 NodeAllocatable 減去,並協助全叢集排程器判斷要放置於哪些節點上的 Pod。 排程沒有限制的 Pod 可能會過度佈建 Windows 節點,而且在極端情況下可能會導致節點變成狀況不良。
自 6.4.0-main-02-22-2023-3ee44b9e 受控 Prometheus 附加元件容器 (prometheus_collector) 起,已針對 AKS 叢集啟用 Windows 計量集合。 上線至 Azure 監視器計量附加元件可讓 Windows DaemonSet Pod 開始在節點集區上執行。 Windows Server 2019 和 Windows Server 2022 都有支援。 請遵循下列步驟,讓 Pod 從您的 Windows 節點集區收集計量。
在 AKS 節點上手動安裝 Windows 匯出工具,以存取 Windows 計量。 啟用下列收集器:
[defaults]
container
memory
process
cpu_info
如需更多收集器,請參閱 Windows 計量的 Prometheus 匯出工具。
部署 windows-exporter-daemonset YAML 檔案:
kubectl apply -f windows-exporter-daemonset.yaml
將 ama-metrics-settings-configmap 套用至您的叢集。 將
windowsexporter
與windowskubeproxy
布林值設定為true
。 將 ama-metrics-settings-configmap 套用至您的叢集。開啟立即可用儀表板所需的錄製規則:
驗證部署
使用 kubectl 命令行工具 來確認代理程式是否已正確部署。
Managed Prometheus
確認 DaemonSet 已正確部署於 Linux 節點集區
kubectl get ds ama-metrics-node --namespace=kube-system
Pod 的數目應該等於叢集上的 Linux 節點數目。 輸出應類似下列範例:
User@aksuser:~$ kubectl get ds ama-metrics-node --namespace=kube-system
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
ama-metrics-node 1 1 1 1 1 <none> 10h
確認已正確部署 Windows 節點
kubectl get ds ama-metrics-win-node --namespace=kube-system
Pod 的數目應該等於叢集上的 Windows 節點數目。 輸出應類似下列範例:
User@aksuser:~$ kubectl get ds ama-metrics-node --namespace=kube-system
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
ama-metrics-win-node 3 3 3 3 3 <none> 10h
確認已針對 Prometheus 部署兩個 ReplicaSet
kubectl get rs --namespace=kube-system
輸出應類似下列範例:
User@aksuser:~$kubectl get rs --namespace=kube-system
NAME DESIRED CURRENT READY AGE
ama-metrics-5c974985b8 1 1 1 11h
ama-metrics-ksm-5fcf8dffcd 1 1 1 11h
容器深入解析
確認 DaemonSet 已正確部署於 Linux 節點集區
kubectl get ds ama-logs --namespace=kube-system
Pod 的數目應該等於叢集上的 Linux 節點數目。 輸出應類似下列範例:
User@aksuser:~$ kubectl get ds ama-logs --namespace=kube-system
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
ama-logs 2 2 2 2 2 <none> 1d
確認已正確部署 Windows 節點
kubectl get ds ama-logs-windows --namespace=kube-system
Pod 的數目應該等於叢集上的 Windows 節點數目。 輸出應類似下列範例:
User@aksuser:~$ kubectl get ds ama-logs-windows --namespace=kube-system
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
ama-logs-windows 2 2 2 2 2 <none> 1d
確認容器深入解析解決方案的部署
kubectl get deployment ama-logs-rs --namespace=kube-system
輸出應類似下列範例:
User@aksuser:~$ kubectl get deployment ama-logs-rs --namespace=kube-system
NAME READY UP-TO-DATE AVAILABLE AGE
ama-logs-rs 1/1 1 1 24d
使用 CLI 來檢視設定
使用 aks show
命令來了解解決方案已啟用、Log Analytics 工作區資源識別碼,以及叢集的摘要資訊。
az aks show -g <resourceGroupofAKSCluster> -n <nameofAksCluster>
此命令會傳回解決方案的 JSON 格式資訊。 addonProfiles
區段應包含 omsagent
的相關資訊,如下列範例所示:
"addonProfiles": {
"omsagent": {
"config": {
"logAnalyticsWorkspaceResourceID": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my-resource-group/providers/microsoft.operationalinsights/workspaces/my-workspace",
"useAADAuth": "true"
},
"enabled": true,
"identity": null
},
}
已佈建的資源
當您按下啟用監視時,您的訂用帳戶中會建立下列資源:
資源名稱 | 資源類型 | 資源群組 | 區域/位置 | 描述 |
---|---|---|---|---|
MSCI-<aksclusterregion>-<clustername> |
資料收集規則 | 與叢集相同 | 與 Log Analytics 工作區相同 | 此資料收集規則適用於 Azure 監視器代理程式的記錄收集,此代理程式會使用 Log Analytics 工作區作為目的地,且與 AKS 叢集資源相關聯。 |
MSPROM-<aksclusterregion>-<clustername> |
資料收集規則 | 與叢集相同 | 與 Azure 監視器工作區相同 | 此資料收集規則適用於計量附加元件所收集的 Prometheus 計量,其已選擇的 Azure 監視器工作區作為目的地,也會與 AKS 叢集資源相關聯 |
MSPROM-<aksclusterregion>-<clustername> |
資料收集端點 | 與叢集相同 | 與 Azure 監視器工作區相同 | 上述資料收集規則會使用此資料收集端點,從計量附加元件擷取 Prometheus 計量 |
當您建立新的 Azure 監視器工作區時,會將下列其他資源建立為其中的一部分
資源名稱 | 資源類型 | 資源群組 | 區域/位置 | 描述 |
---|---|---|---|---|
<azuremonitor-workspace-name> |
資料收集規則 | MA_<azuremonitor-workspace-name>_<azuremonitor-workspace-region>_managed | 與 Azure 監視器工作區相同 | 當您使用 OSS Prometheus 伺服器遠端寫入至 Azure 監視器工作區時所建立的 DCR。 |
<azuremonitor-workspace-name> |
資料收集端點 | MA_<azuremonitor-workspace-name>_<azuremonitor-workspace-region>_managed | 與 Azure 監視器工作區相同 | 當您使用 OSS Prometheus 伺服器遠端寫入至 Azure 監視器工作區時所建立的 DCE。 |
Windows 叢集與 Linux 叢集之間的差異
監視 Windows Server 叢集和 Linux 叢集的主要差異包括:
- Windows 沒有記憶體 RSS 計量。 因此,不適用於 Windows 節點和容器。 工作集計量可供使用。
- 磁碟儲存體容量資訊不適用於 Windows 節點。
- 只會監視 Pod 環境,不監視 Docker 環境。
- 預覽版本最多支援 30 個 Windows Server 容器。 Linux 容器無此限制。
注意
Windows Server 2022 作業系統的容器深入解析支援現供預覽。
容器化 Linux 代理程式 (ReplicaSet Pod) 對叢集內 Kubelet 安全連接埠 (10250) 上的所有 Windows 節點進行 API 呼叫,以收集節點和容器效能相關計量。 Kubelet 安全連接埠 (:10250) 應該已在叢集的虛擬網路中開啟,Windows 節點和容器效能相關計量收集的輸入和輸出才能正常運作。
如果您有包含 Windows 節點的 Kubernetes 叢集,請檢閱並設定網路安全性群組和網路原則,確定已針對叢集虛擬網路中的輸入和輸出開啟 Kubelet 安全連接埠 (:10250)。