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