Book Image

Running Windows Containers on AWS

By : Marcio Morales
Book Image

Running Windows Containers on AWS

By: Marcio Morales

Overview of this book

Windows applications are everywhere, from basic intranet applications to high-traffic public APIs. Their prevalence underscores the importance of combining the same tools and experience for managing a modern containerized application with existing critical Windows applications to reduce costs, achieve outstanding operational excellence, and modernize quickly. This comprehensive guide to running and managing Windows containers on AWS looks at the best practices from years of customer interactions to help you stay ahead of the curve. Starting with Windows containers basics, you’ll learn about the architecture design that powers Amazon ECS, EKS, and AWS Fargate for Windows containers. With the help of examples and best practices, you’ll explore in depth how to successfully run and manage Amazon ECS, EKS, and AWS Fargate clusters with Windows containers support. Next, the book covers day 2 operations in detail, from logging and monitoring to using ancillary AWS tools that fully containerize existing legacy .NET Framework applications into containers without any code changes. The book also covers the most common Windows container operations, such as image lifecycle and working with ephemeral hosts. By the end of this book, you’ll have mastered how to run Windows containers on AWS and be ready to start your modernization journey confidently.
Table of Contents (22 chapters)
1
Part 1: Why Windows Containers on Amazon Web Services (AWS)?
4
Part 2: Windows Containers on Amazon Elastic Container Service (ECS)
9
Part 3: Windows Containers on Amazon Elastic Kubernetes Service (EKS)
14
Part 4: Operationalizing Windows Containers on AWS

Amazon ECS – task networking

For Windows, task networking is limited to two modes, default and awsvpc.

The default uses Docker’s built-in virtual network, a Network Address Translation (NAT) mode on Windows. In the default mode, Docker Engine is responsible for creating and managing the host network on Windows, which is built on top of a Hyper-V virtual switch (vSwitch). That doesn’t mean the Hyper-V hypervisor role is installed; instead, it only uses networking capabilities. Each Windows container is connected to the Hyper-V vSwitch using a virtual network interface card (vNIC):

Figure 3.5 – The Docker network and Windows adapters

Figure 3.5 – The Docker network and Windows adapters

A simple north-south workflow traffic would be as follows:

  1. Multiple Windows containers run within a standalone task with dynamic port enabled.
  2. The data package is sent to the vNIC attached to the Windows container.
  3. The data package is sent to the vSwitch, and Windows Network Address...