gpt4 book ai didi

logging - 如何截断 kubernetes pod 的日志?

转载 作者:行者123 更新时间:2023-12-04 14:34:10 58 4
gpt4 key购买 nike

我下载了一个 pod 的日志,它的大小大于 1G,如何处理/截断 pod 的日志?所以我可以更快地下载它?

PS:我需要清除日志的旧部分,以便释放磁盘空间

最佳答案

kubectl logs --tail=1000只显示最近的 1000 行。根据需要进行调整。

--tail=-1: Lines of recent log file to display. Defaults to -1 with no selector, showing all log lines otherwise 10, if a selector is provided.

关于logging - 如何截断 kubernetes pod 的日志?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58372767/

58 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com