简体   繁体   English

是否可以将 Containerd 日志限制增加到 16K 以上?

[英]Is it possible to increase Containerd log limit greater than 16K?

Our RKE2 environment uses Containerd as runtime.我们的 RKE2 环境使用 Containerd 作为运行时。 We have appllications that writes 50-60 KB lines to stdout and containerd is splitting this stdout logs to separated lines.我们有将 50-60 KB 行写入标准输出的应用程序,并且 containerd 正在将此标准输出日志拆分为单独的行。 Is it possible to increase character or size limit of log lines?是否可以增加日志行的字符或大小限制?

RKE2 version: 2.6.5 Kubernetes Version: v1.21.6+rke2r1 RKE2 版本:2.6.5 Kubernetes 版本:v1.21.6+rke2r1

I think there is no way to increase this log limit, but docker truncate the log when its size is bigger than 16KB without adding \n , so if you use a tool to collect the log (ex: Fluented with concat plugin), you can re-aggregate these messages:我认为没有办法增加这个日志限制,但是 docker 在日志大小大于 16KB 时会截断日志而不添加\n ,所以如果您使用工具收集日志(例如:Fluented with concat plugin),您可以重新汇总这些消息:

<filter **>
    @id filter_concat
    @type concat
    key log
    use_first_timestamp true
    multiline_end_regexp /\n$/
    separator ""
</filter>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 Docker 和 Kubernetes 进行日志记录。 超过 16k 的日志被拆分 - Logging with Docker and Kubernetes. Logs more than 16k split up Kubernetes:增加 K3s 中 OverlayFS / containerd 运行时卷的大小 - Kubernetes: Increase the size of OverlayFS / containerd runtime volumes in K3s 日志文件在使用 Containerd 运行时的 K8s 集群中的什么位置? - Where do the log files live in a K8s cluster using the Containerd runtime? 增加 K8S 入口的 URL 长度限制 - Increase URL length limit for K8S ingress 是否可以增加 WSL2 中的 pod 限制 - Is it possible to increase pod limit in WSL2 无法获取 cpu pod 指标,k8s-containerd-containerd-shim-runsc-v1-gvisor - Unable to fetch cpu pod metrics, k8s- containerd - containerd-shim-runsc-v1 - gvisor 是否可以将 microk8s 设置为使用 docker 引擎而不是 containerd? - Is it possible to set microk8s to use docker engine instead of containerd? 如何在 k3os 中解释“/var/lib/rancher/k3s/agent/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/”行 - how to interpet "/var/lib/rancher/k3s/agent/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/" line in k3os 是否可以在 containerd/kubernetes CRI-O 中运行葡萄酒? - Is it possible to run wine in containerd/ kubernetes CRI-O? 将内存请求设置为小于限制的用例是什么? K8s - What is the use case of setting memory request less than limit in . K8s
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM