azure - 如何确定 AKS 是否使用新的 Azure Monitor 代理?
问题描述
我已将 AKS 群集载入 Azure Monitor。即分配一个 Log Analytics 工作区。
这个入职过程在我的集群中创建了名为 omsagent-xxxx 的 pod。吊舱使用图像:mcr.microsoft.com/azuremonitor/containerinsights/ciprod:ciprod08052021
从 Log Analytics 工作区中,我可以查询从集群中生成的日志和指标。我假设日志和指标是由新创建的 omsagent pod 发送到那里的。
根据https://azure.microsoft.com/en-us/updates/were-retiring-the-log-analytics-agent-in-azure-monitor-on-31-august-2024/,“日志分析代理”将被新的“Azure Monitor Agent”取代。
“发布新版本的代理时,代理会在托管在 Azure Kubernetes 服务 (AKS) 上的托管 Kubernetes 集群上自动升级......”
如何确定我的集群使用的是 Log Analytics 代理还是新的 Azure Monitor 代理?
解决方案
在AKS 发行说明中查看 omsagent ciprod10132021 的最新可用版本。
使用以下命令获取当前运行的 oms 版本:
→ kubectl get deployments -n kube-system -o wide → kubectl get ds omsagent --namespace=kube-system -o wide → kubectl get pods -n kube-system --selector=component=oms-agent -o jsonpath="{.items[*].spec.containers[*].image}" |tr -s '[[:space:]]' '\n' |sort |uniq –c → kubectl get pods -n kube-system --selector=component=oms-agent-win -o jsonpath="{.items[*].spec.containers[*].image}" |tr -s '[[:space:]]' '\n' |sort |uniq -c
推荐阅读
- python-multiprocessing - Python多处理如何在不使用.join()方法的情况下更新管理器列表中的复杂对象
- php - laravel 6.5 显示带有问号的编辑 url
- c++ - “警告:函数的实例化......这里需要,但没有可用的定义”是什么意思?
- php - 通过浏览器使用 php 用 google 翻译
- node.js - Nodejs:npm 查询器不工作的类型输入问题
- ios - Touch Bar 上的 iOS 模拟器 Command 符号是什么?
- linux - bash 字符串操作在 jenkins shell 中出错(不是管道)
- python - 具有不同值的熊猫 backfil 和 ffill
- haskell - 自然数的内射类型族
- python - VS Code Python 调试器“等待被调试对象生成超时”