이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 12. Troubleshooting Windows container workloads


You can troubleshoot Windows container workload issues to ensure that your Windows nodes are running correctly in your cluster.

12.1. Windows Machine Config Operator does not install

If you have completed the process of installing the Windows Machine Config Operator (WMCO), but the Operator is stuck in the InstallWaiting phase, your issue is likely caused by a networking issue.

The WMCO requires your OpenShift Container Platform cluster to be configured with hybrid networking using OVN-Kubernetes; the WMCO cannot complete the installation process without hybrid networking available. This is necessary to manage nodes on multiple operating systems (OS) and OS variants. This must be completed during the installation of your cluster.

12.2. Investigating why Windows Machine does not become compute node

There are various reasons why a Windows Machine does not become a compute node. The best way to investigate this problem is to collect the Windows Machine Config Operator (WMCO) logs.

Prerequisites

  • You installed the Windows Machine Config Operator (WMCO) using Operator Lifecycle Manager (OLM).
  • You have created a Windows compute machine set.

Procedure

  • Run the following command to collect the WMCO logs:

    $ oc logs -f deployment/windows-machine-config-operator -n openshift-windows-machine-config-operator

12.3. Accessing a Windows node

Windows nodes cannot be accessed using the oc debug node command; the command requires running a privileged pod on the node, which is not yet supported for Windows. Instead, a Windows node can be accessed using a secure shell (SSH) or Remote Desktop Protocol (RDP). An SSH bastion is required for both methods.

12.3.1. Accessing a Windows node using SSH

You can access a Windows node by using a secure shell (SSH).

Prerequisites

  • You have installed the Windows Machine Config Operator (WMCO) using Operator Lifecycle Manager (OLM).
  • You have created a Windows compute machine set.
  • You have added the key used in the cloud-private-key secret and the key used when creating the cluster to the ssh-agent. For security reasons, remember to remove the keys from the ssh-agent after use.
  • You have connected to the Windows node using an ssh-bastion pod.

Procedure

  • Access the Windows node by running the following command:

    $ ssh -t -o StrictHostKeyChecking=no -o ProxyCommand='ssh -A -o StrictHostKeyChecking=no \
        -o ServerAliveInterval=30 -W %h:%p core@$(oc get service --all-namespaces -l run=ssh-bastion \
        -o go-template="{{ with (index (index .items 0).status.loadBalancer.ingress 0) }}{{ or .hostname .ip }}{{end}}")' <username>@<windows_node_internal_ip> 
    1
     
    2

    where:

    <username>
    Specifies the cloud provider username, such as Administrator for Amazon Web Services (AWS) or capi for Microsoft Azure.
    <windows_node_internal_ip>

    Specifies the internal IP address of the node, which can be discovered by running the following command:

    $ oc get nodes <node_name> -o jsonpath={.status.addresses[?\(@.type==\"InternalIP\"\)].address}

12.3.2. Accessing a Windows node using RDP

You can access a Windows node by using a Remote Desktop Protocol (RDP).

Prerequisites

  • You installed the Windows Machine Config Operator (WMCO) using Operator Lifecycle Manager (OLM).
  • You have created a Windows compute machine set.
  • You have added the key used in the cloud-private-key secret and the key used when creating the cluster to the ssh-agent. For security reasons, remember to remove the keys from the ssh-agent after use.
  • You have connected to the Windows node using an ssh-bastion pod.

Procedure

  1. Run the following command to set up an SSH tunnel:

    $ ssh -L 2020:<windows_node_internal_ip>:3389 \ 
    1
    
        core@$(oc get service --all-namespaces -l run=ssh-bastion -o go-template="{{ with (index (index .items 0).status.loadBalancer.ingress 0) }}{{ or .hostname .ip }}{{end}}")

    where:

    <windows_node_internal_ip>

    Specifies the internal IP address of the node, which can be discovered by running the following command:

    $ oc get nodes <node_name> -o jsonpath={.status.addresses[?\(@.type==\"InternalIP\"\)].address}
  2. From within the resulting shell, SSH into the Windows node and run the following command to create a password for the user:

    C:\> net user <username> *

    Specify the cloud provider user name, such as Administrator for AWS or capi for Azure. You can now remotely access the Windows node at localhost:2020 using an RDP client.

12.4. 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

  1. To view the logs under all directories in C:\var\logs, run the following command:

    $ 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
  2. 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:

    $ oc adm node-logs -l kubernetes.io/os=windows --path=/kubelet/kubelet.log

12.5. Collecting Windows application event logs

The Get-WinEvent shim on the kubelet logs endpoint can be used to collect application event logs from Windows machines.

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 logs from all applications logging to the event logs on the Windows machine, run:

    $ oc adm node-logs -l kubernetes.io/os=windows --path=journal

    The same command is executed when collecting logs with oc adm must-gather.

    Other Windows application logs from the event log can also be collected by specifying the respective service with a -u flag. For example, you can run the following command to collect logs for the containerd container runtime service:

    $ oc adm node-logs -l kubernetes.io/os=windows --path=journal -u containerd

12.6. Collecting containerd logs for Windows containers

The Windows containerd container service does not stream log data to stdout, but instead, it stream log data to the Windows event log. You can view the containerd event logs to investigate issues you think might be caused by the Windows containerd container service.

Prerequisites

  • You installed the Windows Machine Config Operator (WMCO) using Operator Lifecycle Manager (OLM).
  • You have created a Windows compute machine set.

Procedure

  • View the containerd logs by running the following command:

    $ oc adm node-logs -l kubernetes.io/os=windows --path=containerd
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동