zhu difeng - Fotolia
Despite Linux containers getting most of the attention in modern IT infrastructures, you can still obtain portability, scalability and flexibility with Windows containers. You can orchestrate Windows containers with Kubernetes just like you can with Linux containers, but you must be aware of a few restrictions.
Kubernetes has established itself as the frontrunner for orchestrating container-based workloads. Docker offers Swarm as an option to manage clusters of Docker nodes as a single virtual system, but many cloud-hosting providers don't provide extensive support for Swarm. If you want to move your applications to the cloud, the lack of support for Docker Swarm might cause problems for you.
To access the full multinode capability of Kubernetes, you must install it on Windows Server 1809 or later. In addition, using Kubernetes on a Windows Server requires Linux or Windows worker nodes, which you can run with either Amazon's Elastic Kubernetes Service (EKS) Windows Preview Program or Microsoft's Azure Kubernetes Service (AKS).
Get started with Kubernetes on Windows Server 2019
If you use Kubernetes on Windows Server 2019, you must meet a few requirements. Windows Server 2019 is only supported as a worker node in the Kubernetes architecture. As a result, you must have a Linux master node for any Kubernetes cluster.
In addition, you must use Windows Server 2019 as the base image for both the host and the container. If the host and the container rely on different versions of Windows Server, you risk degrading functionality. Windows Server 2019 also does not support Hyper-V isolation of containers.
Once you meet these requirements, you can start using Kubernetes on Windows Server 2019. Begin by installing Docker with the following two PowerShell commands:
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
Install-Package -Name docker -ProviderName DockerMsftProvider
You must reboot the server once the installations finish. If you intend to run Linux containers -- separate from a Linux worker node -- you must install Docker Enterprise Edition, which comes with the full LinuxKit required to run Docker Linux Containers.
The next step is to install the Linux master node, and then either Linux or Windows worker nodes. You can run all these nodes on the same server hardware using VMs.
AWS vs. Azure
Amazon and Microsoft both enable you to run Windows worker nodes on EKS Windows Preview Program and AKS, but neither is currently available for use in a production environment. Both companies label their offerings as managed services. A managed Kubernetes service in the cloud normally includes network maintenance with the service, as well as other management pieces you must often obtain yourself.
You can find Amazon's EKS Windows Preview Program on GitHub, which hosts all the files and scripts you require. Before beginning with the EKS Windows Preview Program, you must provision a variety of Amazon services, such as the Virtual Private Cloud. The experience mimics that of creating a Kubernetes cluster on your own hardware.
In addition, you must use kubectl via the command-line interface (CLI) to deploy a variety of controllers and add-ons. Amazon simplified the process by providing YAML files to speed things along. Amazon also offers a templating service that makes provisioning a specific application repeatable and uses a Windows Server Internet Information Services as a sample application.
Microsoft uses a larger dose of Azure CLI to stand up an AKS cluster. AKS Windows Containers documentation gives step-by-step instructions to provision your first cluster. You must use kubectl on Azure for issuing management and status commands. Microsoft's sample application is a simple ASP.NET program that displays a static webpage.
Kubernetes and container orchestration
Kubernetes is the way to go for all current and future container orchestration. All major cloud providers have adopted Kubernetes -- even VMware has included Kubernetes as part of their next vSphere release.
If you're new to Kubernetes and must get up to speed quickly, you can use several resources. One of the best ways to learn this new technology is to work through installation process and provision a Kubernetes cluster in a hands-on way.