Windows Server 2019 隨之而來的容器功能,帶領 Windows 容器化邁向另一個里程碑。本次演講將介紹全新容器功能,以及跟 Kubernetes 整合的歷程,並透過線上展示 Windows Server 2019 加入到 Kubernetes 叢集的完整步驟!
👉 Windows Server 高峰會
https://www.microsoft.com/taiwan/events/windows-server-2019/
6. 6
Windows Server 2019 的 WSL
• 好文推薦
– Windows Subsystem for Linux on Windows Server
– Enable the Windows Subsystem for Linux (WSL)
• 啟用選用功能
– Enable-WindowsOptionalFeature -Online -FeatureName
Microsoft-Windows-Subsystem-Linux
• 手動下載 WSL 套件
– Manually download WSL distro packages
• 第一次初始化要先設定帳號密碼
– Initialize a new WSL Linux distro
– sudo apt update && sudo apt upgrade
7. 7
Linux containers on Windows (LCoW)
• 一台伺服器可同時執行 LCoW 與 WCoW
docker run -d -p 80:80 willh/ws2019-iis
docker run -d --isolation=hyperv -p 8080:8080 tomcat
docker run -d --isolation=hyperv -p 8081:80 nginx
8. 8
搶先體驗全新功能
• Windows Server 2016 頻繁的更新
– Semi-Annual Channel (半年發行頻道)
– 將累積更新到 Windows Server 2019 作業系統!
• Windows 10 Insider Build Download
– 請一律安裝英文版
9. 9
相關連結
• Windows 容器文件 (最豐富最完整的文件庫)
– Enable Nested Virtualization when applicable
• Windows 測試人員計畫 (Windows Insider Program)
• Windows 10 Insider Build Download (請一律安裝英文版)
• Docker Hub for Insider container images
– https://hub.docker.com/r/microsoft/windowsservercore-insider
– https://hub.docker.com/r/microsoft/nanoserver-insider
• Windows Server 2019 Insider Preview Build Releases
• Windows Server Blog | Your Guide to the Latest Windows Server Product Information
• Virtualization Blog | Information and announcements from Program Managers, Product
Managers, Developers and Testers in the Microsoft Virtualization team.
• Everything you need to know about Windows Server 2019 – Part 1
• Everything you need to know about Windows Server 2019 – Part 2
• Everything you need to know about Windows Server 2019 – Part 3
• Introducing Windows Server 2019 – now available in preview
17. 17
Kubernetes 1.5
• 2016/12
• Initial alpha
• Kubelet, kube-proxy on Windows
• Networking limitations
– 1 container per pod
• Worked with .NET Framework, Server Core &
Nano
• Showed potential, helped rally community
effort
19. 19
Kubernetes 1.9
• 2017/12
• Beta release
• CRI – pod & node level stats
• Kubeadm support
• CNI plugin for OVS/OVN
• With Windows Server version 1709
– Multiple containers per pod
– Kube-proxy with kernel mode
– Improved performance
– WinCNI plugin
20. 20
Kubernetes 1.10
• 2018/03
• Pods with Hyper-V isolation
• ImageFS stats
• CPU+Mem resource governance
• Native Windows service
• With Windows Server version 1803
– Persistent Volumes, secrets & configmap
– Flexvolume: iSCSI, SMB
22. 22
進行中的開發項目
• Quality & Conformance
– Conformance & Node E2E Testing
• CloudBase+Microsoft effort
• Updating tests
• Finding & fixing bugs
• Ecosystem Readiness
– Switch to ContainerD for latest Windows platform support
– Storage & network plugins
• Setup & Documentation
• Feature completion
– Kubernetes
• Autoscaling
– Windows
• Active Directory Group Managed Service Accounts
• Hyper-V isolation - multiple containers per pod
23. 23
參加 Insider Preview 的由衷建議
• 不要用 Azure 測試 WS2019 + Kubernetes
– 利用 ACE-Engine 體驗預覽版
– Azure Container Service (ACS)
– https://github.com/azure/acs-engine
• 選擇正確的容器 Image ( Link )
– Windows Server Containers 與 OS 共用 Kernel
– 只要 Image Base 與 OS Kernel 不一致就不能跑
• 例外: --isolation=hyperv
– 注意 Build Number (new release of Windows)
– 注意 Revision Number (patching)
24. 24
相關連結
• Extending Kubernetes to Windows Server with Docker EE
• Kubernetes Flannel.docx (重要)
• What's New in Windows Server 2019 Insider Preview Builds
• Matching Container Host Version with Container Image Versions
• 虛擬化技術在 GitHub 上面的 Docs & Samples:
• .NET Architecture Guidance
25. 25
聯絡資訊
• The Will Will Web
記載著 Will 在網路世界的學習心得與技術分享
– http://blog.miniasp.com/
• Will 保哥的技術交流中心 (臉書粉絲專頁)
– http://www.facebook.com/will.fans
• Will 保哥的噗浪
– http://www.plurk.com/willh/invite
• Will 保哥的推特
– https://twitter.com/Will_Huang
Editor's Notes
展示 Windows Server 2019 同時執行 LCOW 與 WCOW
```cmd
cd c:\build
set LCOW_SUPPORTED=1
.\dockerd.exe -D --data-root C:\lcow --experimental
```
```bash
docker run -d -p 81:80 willh/ws2019-iis
```
```bash
docker run -d --isolation=hyperv -p 8080:8080 tomcat
```
```bash
docker run -d --isolation=hyperv -p 8081:80 nginx
``
Exciting new things for Docker with Windows Server 1709 - Docker Blog
https://blog.docker.com/2017/09/docker-windows-server-1709/
Preview: Linux Containers on Windows - Docker Blog
https://blog.docker.com/2017/09/preview-linux-containers-on-windows/
Install Docker Enterprise Edition for Windows Server | Docker Documentation
https://docs.docker.com/install/windows/docker-ee/
Preview Docker for Windows Server 1709 and Windows 10 Fall Creators Update
https://docs.docker.com/install/windows/ee-preview/