Skip to content

Commit 7b6f493

Browse files
authored
Merge pull request #45105 from harshanarayana/kubelet/log-rotate-improvements
kubelet: enable configurable rotation duration and parallel rotate
2 parents b18a286 + 3bdf51e commit 7b6f493

File tree

1 file changed

+10
-1
lines changed
  • content/en/docs/concepts/cluster-administration

1 file changed

+10
-1
lines changed

content/en/docs/concepts/cluster-administration/logging.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,15 @@ using the [kubelet configuration file](/docs/tasks/administer-cluster/kubelet-co
108108
These settings let you configure the maximum size for each log file and the maximum number of
109109
files allowed for each container respectively.
110110

111+
In order to perform an efficient log rotation in clusters where the volume of the logs generated by
112+
the workload is large, kubelet also provides a mechanism to tune how the logs are rotated in
113+
terms of how many concurrent log rotations can be performed and the interval at which the logs are
114+
monitored and rotated as required.
115+
You can configure two kubelet [configuration settings](/docs/reference/config-api/kubelet-config.v1beta1/),
116+
`containerLogMaxWorkers` and `containerLogMonitorInterval` using the
117+
[kubelet configuration file](/docs/tasks/administer-cluster/kubelet-config-file/).
118+
119+
111120
When you run [`kubectl logs`](/docs/reference/generated/kubectl/kubectl-commands#logs) as in
112121
the basic logging example, the kubelet on the node handles the request and
113122
reads directly from the log file. The kubelet returns the content of the log file.
@@ -200,7 +209,7 @@ as your responsibility.
200209

201210
## Cluster-level logging architectures
202211

203-
While Kubernetes does not provide a native solution for cluster-level logging, there are
212+
While Kubernetes does not provide a native solution for cluster-level logging, there are
204213
several common approaches you can consider. Here are some options:
205214

206215
* Use a node-level logging agent that runs on every node.

0 commit comments

Comments
 (0)