You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

新手求助:基于Helm在AKS集群部署Filebeat与Metricbeat的入门指导

AKS + Helm 安装 Filebeat/Metricbeat 入门指导

前置准备

  • 已完成配置并可通过 kubectl 正常访问的 AKS 集群
  • 安装好 Helm 3(执行 helm version 能正常输出版本信息即可)
  • 了解基础的 kubectl 和 Helm 命令逻辑

添加 Elastic 官方 Helm 仓库

Filebeat 和 Metricbeat 属于 Elastic 技术栈,先添加官方维护的 Helm 仓库:

helm repo add elastic https://helm.elastic.co
helm repo update

安装 Filebeat

基础默认安装

直接执行以下命令完成最简安装,默认配置会自动采集 AKS 节点和 Pod 的日志:

helm install filebeat elastic/filebeat

自定义配置(新手常用场景)

如果需要指定日志输出目标(比如自己的 Elasticsearch)或调整采集规则,先导出默认配置文件:

helm show values elastic/filebeat > filebeat-values.yaml

编辑 filebeat-values.yaml,比如修改 Elasticsearch 输出配置:

output:
  elasticsearch:
    hosts: ["your-es-host:9200"]
    username: "elastic"
    password: "your-es-password"

再用自定义配置安装:

helm install filebeat elastic/filebeat -f filebeat-values.yaml

验证安装状态

检查 Pod 是否正常运行:

kubectl get pods -l app=filebeat

查看 Pod 日志确认采集逻辑正常:

kubectl logs <filebeat-pod-name>

安装 Metricbeat

基础默认安装

Metricbeat 默认会采集 AKS 节点、Pod、Kubernetes 组件的监控指标,执行以下命令安装:

helm install metricbeat elastic/metricbeat

自定义配置

同样先导出默认配置文件做调整:

helm show values elastic/metricbeat > metricbeat-values.yaml

比如开启特定资源的监控、修改指标输出目标,编辑后执行安装:

helm install metricbeat elastic/metricbeat -f metricbeat-values.yaml

验证安装状态

检查 Pod 运行状态:

kubectl get pods -l app=metricbeat

指标可通过对应的 Elasticsearch 或 Kibana(若已部署)查看。

新手避坑提示

  • 确保 AKS 节点有足够资源:每个 Beat Pod 大概需要 100-200m CPU、256Mi 内存
  • 若没有配套的 Elasticsearch/Kibana,可通过 Helm 一并安装 Elastic 栈其他组件
  • 权限无需手动配置:官方 Chart 会自动创建合适的 RBAC 权限,保证 Beat 能正常采集数据
  • 后续维护:用 helm upgrade filebeat elastic/filebeat -f filebeat-values.yaml 完成版本升级或配置更新

内容的提问来源于stack exchange,提问作者Maxx

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.04 15:50:23