Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Orchestrating and Monitoring Hybrid Windows-Linux Container Environments

DZone's Guide to

Orchestrating and Monitoring Hybrid Windows-Linux Container Environments

Windows has certainly cozied up to Linux in the past year. So, if you're running a hybrid Windows-Linux container environment, here's what you need to know.

· Cloud Zone ·
Free Resource

See why enterprise app developers love Cloud Foundry. Download the 2018 User Survey for a snapshot of Cloud Foundry users’ deployments and productivity.

In our previous blog post on Microsoft Windows container monitoring, we talked about the new developments around Windows containers and how they are different from what we have seen in the Linux space. In this second part, we continue this discussion by also considering orchestration technologies and their impact on Windows containers, including hybrid container environments.

Orchestrator Choices for Windows and Hybrid Clusters

Orchestrators like Kubernetes, Docker Swarm, and Docker EE are a vital component when moving containers into production. Orchestrators manage your nodes and container workloads with the goal of maintaining a stable and scalable environment. This includes auto-scaling and self-healing capabilities, e.g. taking nodes offline for abnormal behavior, restarting containers, and the possibility of setting resource constraints to maximize your cluster usage.

Since Microsoft released Docker support on Windows, we witnessed some of the orchestrator technologies also adding in support for Windows containers and hybrid environments. Hybrid container environments are orchestration clusters where you have a mix of Linux and Windows hosts.

Bringing Microsoft Windows and Linux together into the same cluster environment brings some distinct advantages to your environment. As Microsoft is moving into the Linux space with the release of Microsoft SQL Server for Linux and dotnet/core, it is becoming easier as a Microsoft developer to use the power of Linux servers in your environment.

Enterprises usually also still have a set of legacy applications that need to run on Windows. In this case, a hybrid environment makes it easier to let the new and old work together, as it allows you to pick the platform that matches your problem set while still keeping everything in the same familiar Docker environment.

Swarm vs. Kubernetes

Docker Swarm and Docker EE were one of the first to support hybrid clouds in a container-native way. Docker Swarm is aware what type of container you are running and will automatically orchestrate on the right OS type.

Image title

Kubernetes added alpha support for Windows hosts in Kubernetes 1.5, improving it in later releases. At the moment, you need to manually set the nodeSelector to the Windows nodes for Windows applications.

Image title

Security

The big advantage of running a hybrid environment is that you could run some containers in a high-security mode using the Microsoft Windows Hyper-V container mode. These containers exist in a completely isolated environment, but with configuration, they can still talk to any of the other containers in your cluster. This gives you the benefits of containers, but without the overhead of running a full-fledged operating system.

This means that you could, for example, use Windows Hyper-V containers as gateways for your Linux containers.

Image title

Container Networking

The teams at Microsoft have been putting in a lot of effort to improve the Network stack for Kubernetes/Swarm support. The work that Microsoft has put in means that your Linux and Windows containers can share the same network space, allowing containers from one operating system to easily communicate with the other without the need to set up a complicated network environment. The Windows side does require some setup, but that is a fairly straightforward process.

Image title

What Does it Mean for Monitoring?

Running hybrid Windows-Linux containers is great, but now you also need to make sure that you can obtain visibility in such environments. This is important to ensure that your containers are running as expected and to quickly detect any performance issues with your services that are spread out over a hybrid environment.

However, many tools for container monitoring only support Linux containers, leaving the Windows part as a blind spot. Obviously, this is not desired, and having to use different tools to monitor different parts of a hybrid environment is also not an ideal situation. Even if you are not running Windows containers right now, you might do so in the future, and it is best to choose a monitoring tool that is flexible enough to deal with different environments.

Image title

Azure Container Service

Besides running your own Kubernetes cluster, you can also opt for a hosted Kubernetes solution. For Windows users, the Azure cloud and the new Azure Container Service (AKS) would the logical choice. 

Cloud Foundry saves app developers $100K and 10 weeks on average per development cycle. Download the 2018 User Survey for a snapshot of Cloud Foundry users’ deployments and productivity. Find out what people love about the industry standard cloud application platform.

Topics:
windows ,cloud ,linux ,container orchestration ,tutorial

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}