51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

kubesphere修改日志数据保留期限

修改日志数据保留天数

https://www.kubesphere.io/zh/docs/v3.4/faq/observability/logging/

1.执行以下命令

kubectl edit cc -n kubesphere-system ks-installer

2.将 status.logging 的注释取消,将

es.logMaxAge 的值

设置为所需保留期限(默认为 7 天)。。

图示例供您参考:

3.重新运行 ks-installer。

kubectl rollout restart deploy -n kubesphere

system ks-installer

如何让 KubeSphere 只收集指定工作负载的日志

KubeSphere 的日志代理由 Fluent Bit 所提供,您需要更新 Fluent Bit 配置来排除某些工作负载的

日志。若要修改 Fluent Bit 输入配置,请运行以下命令:

kubectl edit input -n kubesphere-logging-system tail

更新 Input.Spec.Tail.ExcludePath 字段。例如,将路径设置为 /var/log/containers/*_kube*-

system_*.log,以排除系统组件的全部日志。

赞(0)
未经允许不得转载:工具盒子 » kubesphere修改日志数据保留期限