共倒金荷家万里
English
往期整理
  •   文章分类
  •   文章标签
共倒金荷家万里
Article
44
Category
2
Tags
6
English
往期整理
文章分类
文章标签
work
fluentd&fluentbit-on-k8s
Post on: 2024-9-30
Last edited: 2024-9-30
Views
Kubernetes
type
status
date
slug
summary
tags
category
icon
password

使用Podman on Linux安装kind

Installing podman on Linux
Install kubectl
Install kind
Creating a kind cluster
get kubernetes cluster master IP
e.g.

登录master安装ECK+fluentd

安装ECK,参考
EFK-on-k8s
安装fluentd
Get Fluentd DaemonSet sources
Logging to Elasticsearch(关于FLUENT_CONTAINER_TAIL_EXCLUDE_PATH和FLUENT_CONTAINER_TAIL_PARSER_TYPE抄自github issue,解决fluentd解析日志乱码的问题,具体原理尚待研究)

使用Kibana with fluentd

暴露Kibana服务
暂且使用最简单的nodeport
访问Kibana服务
进入discove
notion image
创建数据视图
notion image
搜索日志
notion image

使用ECK+fluent bit替代ECK+fluentd

安装ECK,参考
EFK-on-k8s
安装fluent bit
Installing with Helm Chart
在此期间,遇到两个报错:
  1. "Action/metadata line [1] contains an unknown parameter [_type]",解决方法Suppress_Type_Name On,具体原理暂不详述
  1. "[engine] failed to flush chunk",这个报错是个warning,并且ES已正确收到日志,这个报错原理尚待研究

使用Kibana with fluent bit

暴露Kibana服务
暂且使用最简单的nodeport
访问Kibana服务
进入discove
notion image
创建数据视图
notion image
搜索日志
notion image

生产建议

Both Fluentd and Fluent Bit can work as Aggregators or Forwarders, they both can complement each other or use them as standalone solutions. In the recent years, Cloud Providers switched from Fluentd to Fluent Bit for performance and compatibility reasons. Fluent Bit is now considered the next generation solution.
看起来云计算生态正在拥抱Fluent Bit,因此我们使用Fluent Bit进行末端数据采集,参考EFK-on-k8s的生产建议:filebeat->Kafka->logstash->elastic search->kibana,Fluent Bit的生产建议我认为是这样的:Fluent Bit->Kafka->Fluentd->ElasticSearch+Kibana
安装ECK,参考
EFK-on-k8s
安装kafka,参考
kafka-on-k8s
安装fluentd
Get Fluentd DaemonSet sources
修改Gemfile,重新build image,上传docker hub(增加集成kafka插件,默认镜像只集成了es插件)
创建configmap(增加集成kafka input配置,删除集成k8s input配置,默认配置只集成了k8s input和es output配置)
修改fluentd-daemonset-elasticsearch-rbac.yaml
安装fluent bit
Installing with Helm Chart
暴露Kibana服务
暂且使用最简单的nodeport
访问Kibana服务
进入discove
notion image
创建数据视图
notion image
搜索日志
notion image
这里报错400,看起来es认为日志格式有问题,正在排查,待续……
  • Author:共倒金荷家万里
  • URL:https://tangly1024.com/article/11140ef0-3786-80ca-a715-e75b109ab124
  • Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!
Relate Posts
istio-on-k8s
prometheus-on-k8s
contour-on-k8s
kafka-on-k8s
EFK-on-k8s
zookeeper-on-k8s
istio-on-k8sprometheus-on-k8s
Loading...
Catalog
0%
使用Podman on Linux安装kind登录master安装ECK+fluentd使用Kibana with fluentd使用ECK+fluent bit替代ECK+fluentd使用Kibana with fluent bit生产建议
共倒金荷家万里
共倒金荷家万里
何日把酒言欢
Article
44
Category
2
Tags
6
Latest posts
RAGFlow practice
RAGFlow practice
2025-4-7
Dify practice
Dify practice
2025-4-7
DBMotion deployment
DBMotion deployment
2024-12-10
datebase deployment(on laptop)
datebase deployment(on laptop)
2024-11-8
mysql shell migrate mysql
mysql shell migrate mysql
2024-11-6
wordpress+mysql+minio development(on cloud service)
wordpress+mysql+minio development(on cloud service)
2024-11-6
Announcement
实践是检验真理的唯一标准
 
Catalog
0%
使用Podman on Linux安装kind登录master安装ECK+fluentd使用Kibana with fluentd使用ECK+fluent bit替代ECK+fluentd使用Kibana with fluent bit生产建议
2021-2025 共倒金荷家万里.

共倒金荷家万里 | 何日把酒言欢

Powered by NotionNext 4.7.3.