1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/collecting-kube-node-logs-windows.adoc
Max Bridges b5fc467d1f add content types to untagged modules
OSDOCS-16694
2025-10-31 21:02:28 -04:00

36 lines
1.4 KiB
Plaintext

// Module included in the following assemblies:
//
// * support/troubleshooting/troubleshooting-windows-container-workload-issues.adoc
:_mod-docs-content-type: PROCEDURE
[id="collecting-kube-node-logs-windows_{context}"]
= Collecting Kubernetes node logs for Windows containers
Windows container logging works differently from Linux container logging; the Kubernetes node logs for Windows workloads are streamed to the `C:\var\logs` directory by default. Therefore, you must gather the Windows node logs from that directory.
.Prerequisites
* You installed the Windows Machine Config Operator (WMCO) using Operator Lifecycle Manager (OLM).
* You have created a Windows compute machine set.
.Procedure
. To view the logs under all directories in `C:\var\logs`, run the following command:
+
[source,terminal]
----
$ oc adm node-logs -l kubernetes.io/os=windows --path= \
/ip-10-0-138-252.us-east-2.compute.internal containers \
/ip-10-0-138-252.us-east-2.compute.internal hybrid-overlay \
/ip-10-0-138-252.us-east-2.compute.internal kube-proxy \
/ip-10-0-138-252.us-east-2.compute.internal kubelet \
/ip-10-0-138-252.us-east-2.compute.internal pods
----
. You can now list files in the directories using the same command and view the individual log files. For example, to view the kubelet logs, run the following command:
+
[source,terminal]
----
$ oc adm node-logs -l kubernetes.io/os=windows --path=/kubelet/kubelet.log
----