7.9.3.2. RDP を使用した Windows ノードへのアクセス
Remote Desktop Protocol (RDP) を使用して Windows ノードにアクセスできます。
前提条件
- Operator Lifecycle Manager (OLM) を使用して Windows Machine Config Operator (WMCO) をインストールしている。
- Windows マシンセットを作成している。
-
cloud-private-key
シークレットで使用されるキーおよび ssh-agent に対してクラスターを作成する際に使用されるキーを追加している。セキュリティー上の理由から、キーは使用後は ssh-agent から削除するようにしてください。 -
ssh-bastion
Pod を使用して Windows ノードに接続している。
手順
以下のコマンドを実行して SSH トンネルを設定します。
$ 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}}")
- 1
- 以下のコマンドを実行して検出可能な、ノードの内部 IP アドレスを指定します。
$ oc get nodes <node_name> -o jsonpath={.status.addresses[?\(@.type==\"InternalIP\"\)].address}
生成されるシェル内で Windows ノードに対して SSH を実行し、以下のコマンドを実行してユーザーのパスワードを作成します。
C:\> net user <username> * 1
- 1
- AWS の
Administrator
、または Azure のcapi
などのクラウドプロバイダーのユーザー名を指定します。
RDP クライアントを使用して、localhost:2020
で Windows ノードにリモートでアクセスできるようになりました。