Agenda
1. Windows Container Mode
2. Runtime of Windows Container
3. Reference
Slide 4
Slide 4 text
Windows Container Mode
Slide 5
Slide 5 text
Windows Container Mode
プロセス 分離モード(Windows Server Container)
Hyper-V 分離モード(Hyper-V Container)
ホストOSのカーネルを共有しながら、ホストOSや他のコンテナーから分離されたユーザー
モードプロセスの実行環境を提供。
Linux上のDocker + コンテナーと同様
Hyper-Vハイパーバイザーを利用して、隔離されたコンテナーごとの専用環境を提供。確
実なリソースと厳密なセキュリティ境界が特徴。
ホストOSのカーネルを共用することはない、Windows特有機能。
Slide 6
Slide 6 text
Windows Container Mode
プロセス 分離モード(Windows Server Container)
BareMetal or Virtual Machine
Docker Client
Windows Server
Docker
ホストOSのバージョン/ビルドと
Windowsコンテナーのバージョン/ビル
ドが同じ必要があります。
カーネル共有における制限
Windows
Container
Windows
Container
Windows
Container
Kernel Share
Slide 7
Slide 7 text
Windows Container Mode
Hyper-V 分離モード(Hyper-V Container)
BareMetal or Hyper-V Virtual Machine
Docker Client
Docker
UtilityVM
Windows Server
Utility VM
(Windows Kernel)
Windows Container
Utility VM
(Linux Kernel)
Linux Container
UtilityVMと呼ばれる仮想マシンがその
上で稼働するコンテナーにカーネルを
提供します。
Hyper-V分離モードのコンテナーは、ホ
ストOSのカーネルを共有することはあ
りません。
Kernel Share Kernel Share
Linux Containers on Windows
(LCOW)
Hyper-V Container
Hyper-V Hypervisor
Slide 8
Slide 8 text
Runtime of Windows Container
Slide 9
Slide 9 text
Runtime of Windows Container
“Linux + Docker + Runtime”
Slide 10
Slide 10 text
Runtime of Windows Container
Docker
Docker Client
containerd
runC
Linux
cgroups Namespaces
Union
Filesystem
Network
Low-level
Container Runtime
High-level
Container Runtime
OCI(Open Container Initiative)
CRI(Container Runtime Interface)
kubelet
Slide 11
Slide 11 text
Runtime of Windows Container
“Windows + Docker + Runtime”
Slide 12
Slide 12 text
Runtime of Windows Container
BareMetal & Virtual Machine
Docker Client
Windows Server
Docker Windows
Container
Windows
Container
Windows
Container
Kernel Share
View the detail
この部分を詳しく...
プロセス 分離モード(Windows Server Container)
Slide 13
Slide 13 text
Runtime of Windows Container
Docker
Docker Client
Windows
libcontainerd
hcsshim
HCS(Host Compute Service) HNS(Host Network Service)
Job
objects
Namespaces
Union
like filesystem extensions
WinNAT
Windows
Firewall
vSwitch TCP/IP
VPF
libnetwork plugins
Windows
Container
Windows
Container
Runtime of Windows Container
“Windows + Docker + Kubernetes + Runtime”
Slide 16
Slide 16 text
Runtime of Windows Container
2019.03 Kubernetes 1.14
Windows(Docker EE-basic 18.09+、Windows Server 2019/1809+)ノードをワーカー
ノードとして追加し、Windowsコンテナーをスケジュールする機能をサポート。※Control
PlaneはLinuxであることが制限事項
参考:Intro to Windows support in Kubernetes
(https://kubernetes.io/ja/docs/setup/production-environment/windows/intro-windows-in-kubernetes/)
2020年8月時点では、Kubernetesで対応するWindowsコンテナーは、
プロセス分離モード、Hyper-V分離モードはKubernetes 1.20(containerd1.5)予定。
History
Slide 17
Slide 17 text
Runtime of Windows Container
Docker
Docker Client
kubelet
libcontainerd libnetwork plugins
Windows
HCS(Host Compute Service) HNS(Host Network Service)
Job objects Namespaces
Union like filesystem extensions
WinNAT Windows Firewall
TCP/IP vSwitch VPF
dockershim
hcsshim
Windows
Container
Windows
Container
Slide 18
Slide 18 text
Runtime of Windows Container
2020.03 Kubernetes 1.18
Windows上のCRI-ContainerDのサポートを追加(Containerd1.3)。
参考:Intro to Windows support in Kubernetes
(https://kubernetes.io/ja/docs/setup/production-environment/windows/intro-windows-in-kubernetes/)
● Enable CRI plugin #4076
● Add support for Windows containers process isolation cri#1264
● Build CRI Plugin on Windows and add presubmit cri#1258
Containerd 1.4で実際は追加されました。(2020年8月時点)。
(https://github.com/containerd/containerd/releases)
Slide 19
Slide 19 text
kubelet
Windows
Runtime of Windows Container
Docker
Docker Client
containerd
containerd-shim(runhcs)
libcontainerd libnetwork plugins
HCS(Host Compute Service) HNS(Host Network Service)
Job objects Namespaces
Union like filesystem extensions
WinNAT Windows Firewall
TCP/IP vSwitch VPF
hcsshim
CRI(Container Runtime Interface)
CRI API
Windows
Container
Windows
Container
OCI(Open Container Initiative)
OCI準拠のruncのフォーク
Slide 20
Slide 20 text
No content
Slide 21
Slide 21 text
Runtime of Windows Container
Simplifying Windows runtime and deployment in Kubernetes - Muzz Imam, Microsoft & Michael Michael, VMware
Slide 22
Slide 22 text
kubelet
Windows
Runtime of Windows Container
Docker
Docker Client
containerd
containerd-shim (hcsshim)
libcontainerd libnetwork plugins
HCS(Host Compute Service) HNS(Host Network Service)
Job objects Namespaces
Union like filesystem extensions
WinNAT Windows Firewall
TCP/IP vSwitch VPF
hcsshim
CRI(Container Runtime Interface)
CRI API
Windows
Container
Windows
Container
Slide 23
Slide 23 text
Runtime of Windows Container
Simplifying Windows runtime and deployment in Kubernetes - Muzz Imam, Microsoft & Michael Michael, VMware
Slide 24
Slide 24 text
Runtime of Windows Container
Simplifying Windows runtime and deployment in Kubernetes - Muzz Imam, Microsoft & Michael Michael, VMware
Kubernetes 1.20
Containerd 1.5
に向けて
Slide 25
Slide 25 text
Runtime of Windows Container
Simplifying Windows runtime and deployment in Kubernetes - Muzz Imam, Microsoft & Michael Michael, VMware
Slide 26
Slide 26 text
Runtime of Windows Container
Add
Windows
Node to
Kubernetes
Cluster
(GA or Experiment)
Enterprise
Slide 27
Slide 27 text
Reference
Slide 28
Slide 28 text
Reference
I referred to the good books and internet information.
Slide 29
Slide 29 text
Reference
● Windows コンテナー プラットフォーム
https://docs.microsoft.com/ja-jp/virtualization/windowscontainers/deploy-containers/containerd
● Introducing the Host Compute Service (HCS)
https://techcommunity.microsoft.com/t5/containers/introducing-the-host-compute-service-hcs/ba-p/382332
● Windows上のコンテナに関するドキュメント
https://docs.microsoft.com/ja-jp/virtualization/windowscontainers/
● Kubernetesエコシステム-コンテナランタイム編
https://www.kaitoy.xyz/2019/06/15/k8s-ecosystem-container-runtimes/#containerd
● Docker Desktop の復習と、Windows Container に入門: Windows Server Container 理論編
https://qiita.com/kikuchi_kentaro/items/2fb0171e18821d402761
● Intro to Windows support in Kubernetes (翻訳に協力)
https://kubernetes.io/ja/docs/setup/production-environment/windows/intro-windows-in-kubernetes/
● sig-windows
https://github.com/kubernetes/enhancements/tree/master/keps/sig-windows