在 Kubernetes 上用 Fluent Bit 收集 Nginx 日志到 OpenSearch

上一篇我们用 Helm 部署了 OpenSearch 集群和 Dashboards,这篇接着讲怎么用 Fluent Bit 把 Kubernetes 中 Nginx 的日志采集到 OpenSearch,并在 Dashboards 里查看和过滤。

本文假设你已经有一个运行中的 OpenSearch 集群,如果没有可以参考上一篇文章。

部署一个 Nginx 用于测试

先部署一个简单的 Nginx 作为日志来源:

1
2
kubectl create deployment nginx --image=nginx
kubectl expose deployment nginx --port=80

安装 Fluent Bit

添加 Helm 仓库:

1
2
helm repo add fluent https://fluent.github.io/helm-charts
helm repo update
阅读更多
Your browser is out-of-date!

Update your browser to view this website correctly.&npsb;Update my browser now

×