@@ -157,7 +157,7 @@ If systemd is not present, the kubelet and container runtime write to `.log` fil
157
157
run the kubelet via a helper tool, ` kube-log-runner ` , and use that tool to redirect
158
158
kubelet logs to a directory that you choose.
159
159
160
- The kubelet always directs your container runtime to write logs into directories within
160
+ By default, kubelet directs your container runtime to write logs into directories within
161
161
` /var/log/pods ` .
162
162
163
163
For more information on ` kube-log-runner ` , read [ System Logs] ( /docs/concepts/cluster-administration/system-logs/#klog ) .
@@ -175,7 +175,7 @@ If you want to have logs written elsewhere, you can indirectly
175
175
run the kubelet via a helper tool, ` kube-log-runner ` , and use that tool to redirect
176
176
kubelet logs to a directory that you choose.
177
177
178
- However, the kubelet always directs your container runtime to write logs within the
178
+ However, by default, kubelet directs your container runtime to write logs within the
179
179
directory ` C:\var\log\pods ` .
180
180
181
181
For more information on ` kube-log-runner ` , read [ System Logs] ( /docs/concepts/cluster-administration/system-logs/#klog ) .
@@ -189,6 +189,22 @@ the `/var/log` directory, bypassing the default logging mechanism (the component
189
189
do not write to the systemd journal). You can use Kubernetes' storage mechanisms
190
190
to map persistent storage into the container that runs the component.
191
191
192
+ Kubelet allows changing the pod logs directory from default ` /var/log/pods `
193
+ to a custom path. This adjustment can be made by configuring the ` podLogsDir `
194
+ parameter in the kubelet's configuration file.
195
+
196
+ {{< caution >}}
197
+ It's important to note that the default location ` /var/log/pods ` has been in use for
198
+ an extended period and certain processes might implicitly assume this path.
199
+ Therefore, altering this parameter must be approached with caution and at your own risk.
200
+
201
+ Another caveat to keep in mind is that the kubelet supports the location being on the same
202
+ disk as ` /var ` . Otherwise, if the logs are on a separate filesystem from ` /var ` ,
203
+ then the kubelet will not track that filesystem's usage, potentially leading to issues if
204
+ it fills up.
205
+
206
+ {{< /caution >}}
207
+
192
208
For details about etcd and its logs, view the [ etcd documentation] ( https://etcd.io/docs/ ) .
193
209
Again, you can use Kubernetes' storage mechanisms to map persistent storage into
194
210
the container that runs the component.
0 commit comments