Linux and Windows, living together, total chaos! (OK, Kubernetes 1.5)
There’s Linux, and there’s Windows. Windows apps don’t run on Linux. Linux apps don’t run on Windows. We’re told that. A lot. In fact, when Docker brought containers into prominence as a way to pack up your application’s dependencies and ship it “anywhere”, the definition of “anywhere” was quick to include “Linux”. Sure, there were Windows containers, but getting everything to work together was not particularly practical.
With today’s release of Kubernetes 1.5, that all changes.
Kubernetes 1.5 includes alpha support for both Windows Server Containers, a shared kernel model similar to Docker, and Hyper-V Containers, a single-kernel model that provides better isolation for multi-tenant environments (at the cost of greater latency). The end result is the ability to create a single Kubernetes cluster that includes not just Linux nodes running Linux containers or Windows nodes running Windows containers, but both side by side, for a truly hybrid experience. For example, a single service can have PODs using Windows Server Containers and other PODs using Linux containers.
Though it appears fully functional, there do appear to be some limitations in this early release, including:
The Kubernetes master must still run on Linux due to dependencies in how it’s written. It’s possible to port to Windows, but for the moment the team feels it’s better to focus their efforts on the client components.
There is no native support for network overlays for containers in windows, so networking is limited to L3. (There are other solutions, but they’re not natively available.) The Kubernetes Windows SIG is working with Microsoft to solve these problems, however, and they hope to have made progress by Kubernetes 1.6’s release early next year.
Networking between Windows containers is more complicated because each container gets its own network namespace, so it’s recommended that you use single-container pods for now.
Applications running in Windows Server Containers can run in any language supported by Windows. You CAN run .NET applications in Linux containers, but only if they’re written in .NET Core. .NET core is also supported by the Nano Server operating system, which can be deployed on Windows Server Containers.
This release also includes support for IIS (which still runs 11.4% of the internet) and ASP.NET.
The development effort, which was led by Apprenda, was aimed at providing enterprises the means for making use of their existing Windows investments while still getting the advantages of Kubernetes. “Our strategy is to give our customers an enterprise hardened, broad Kubernetes solution. That isn’t possible without Windows support. We promised that we would drive support for Kubernetes on Windows Server 2016 in March and now we have reached the first milestone with the 1.5 release.” said Sinclair Schuller, CEO of Apprenda. “We will deliver full parity to Linux in orchestrating Windows Server Containers and Hyper-v containers so that organizations get a single control plane for their distributed apps.”
You can see a demo of Apprenda’s Senior Director of Products, Michael Michael, explaining the functionality here:
Other features in Kubernetes 1.5
Kubernetes 1.5 also includes beta support for StatefulSets (formerly known as PetSets). Most of the objects that Kubernetes manages, such as ReplicaSets and Pods, are meant to be stateless, and thus “disposable” if they go down or become otherwise unreachable. In some situations, however, such as databases, cluster software (such as RabbitMQ clusters), or other traditionally stateful objects, this might not be feasible. StatefulSets provide a means for more concretely identifying resources so that connections can be maintained.