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 VPC CNI for Windows

Amazon EKS supports a native network plugin called Amazon VPC Container Network Interface (CNI) that has two main responsibilities:

  • Creating Elastic Network Interfaces (ENIs) and attaching them to the Amazon EC2 nodes or using a combination of prefix-delegation per ENI
  • Assigning a private IPv4 or IPv6 address from your VPC to each pod and service

By default, the number of IP addresses available to be assigned to pods is a calculation based on the number of IP addresses available on each ENI and the number of ENIs that can be attached to the Amazon EC2 instance. The following formula applies:

(Number of ENIs * IP addresses per interface) - 3 = Total IPv4 addresses available for pods

The minus three is a result of the following:

  • One IP reserved for the Amazon EC2 node primary IP
  • One IP reserved for the VPC CNI
  • One IP reserved for kube-proxy

For instance, we can calculate that a Linux-based node running on an m5...