7.9.3. Windows 노드에 액세스

oc debug node 명령을 사용하여 Windows 노드에 액세스할 수 없습니다. 이 명령을 사용하려면 노드에서 권한 있는 Pod를 실행해야 하는데, 이 기능은 아직 Windows에서 지원되지 않습니다. 대신 SSH(Secure Shell) 또는 RDP(Remote Desktop Protocol)를 사용하여 Windows 노드에 액세스할 수 있습니다. 두 방법 모두 SSH bastion이 필요합니다.

7.9.3.1. SSH를 사용하여 Windows 노드에 액세스

SSH(Secure Shell)를 사용하여 Windows 노드에 액세스할 수 있습니다.

사전 요구 사항

  • OLM(Operator Lifecycle Manager)을 사용하여 WMCO(Windows Machine Config Operator)를 설치했습니다.
  • Windows 머신 세트를 생성했습니다.
  • cloud-private-key 보안에 사용한 키와 클러스터를 만들 때 사용한 키를 ssh-agent에 추가했습니다. 보안상의 이유로 사용 후에는 ssh-agent에서 키를 제거해야 합니다.
  • ssh-bastion Pod를 사용하여 Windows 노드에 연결했습니다.

프로세스

  • 다음 명령을 실행하여 Windows 노드에 액세스합니다.

    $ 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
    1
    AWS(Amazon Web Services)의 Administrator 또는 Microsoft Azure의 capi와 같은 클라우드 공급자 사용자 이름을 지정합니다.
    2
    노드의 내부 IP 주소를 지정합니다. 이 IP 주소는 다음 명령을 실행하여 검색할 수 있습니다.
    $ oc get nodes <node_name> -o jsonpath={.status.addresses[?\(@.type==\"InternalIP\"\)].address}