注意:
1.控制平面的服务依然运行在 Linux 服务器中,而 Windows 节点上只运行 Kubelet、Kube-proxy、Docker 以及网络插件等服务。 2.推荐使用 Windows Server 1803(修复了 Windows 容器软链接的问题,从而 ServiceAccount 和 ConfigMap 可以正常使用)
windows.json
beta.kubernetes.io/os: windows
将容器调度到 Windows 节点上,比如mountPath: "C:\\etc\\foo"
或者 mountPath: "C:/etc/foo"
。Windows Server version 1709
中必须使用带有 1709 标签的镜像,如Windows Server version 1803
中必须使用带有 1803 标签的镜像。而在 Windows Server 2016
上需要使用带有 ltsc2016 标签的镜像,如 microsoft/windowsservercore:ltsc2016
。HyperVContainer
特性开关。然后使用 Annotation experimental.windows.kubernetes.io/isolation-type=hyperv
来指定容器使用 Hyper-V 隔离: