Mastering Windows Server 2016 Hyper-V

(Romina) #1
on  using   these   types   of  networks    with    containers, see
https://technet.microsoft.com/en-us/windows-server-
docs/networking/sdn/manage/connect-container-endpoints-to-a-tenant-virtual-
network. For the networking configuration, either the Docker client (docker.exe)
or the PowerShell module can be used today. However, PowerShell-based
networking management may change in its entirety, so for the most part I focus on
the Docker client for network management. All of the standard Docker network
commands will work for a Windows container host through the Docker network
plug-in for Windows component. Microsoft’s official Docker networking page is at
https://msdn.microsoft.com/en-
us/virtualization/windowscontainers/management/container_networking, and I
recommend reviewing this for the latest updates, as one of the challenges with
open source is that it updates so frequently. Documentation can become out-of-
date, but the key concepts covered here will remain valid even though some details
could change.

OBTAINING   THE DOCKER  POWERSHELL  MODULE
The PowerShell module for Docker is an ongoing open source project still under
development that utilizes the Docker REST API and not the separate management
stack, which was present in early technical previews of Windows Server 2016.
This means that images, containers, and every element managed through
docker.exe are the same, which you will see when leveraging the PowerShell
module. The decision of whether to use docker.exe or PowerShell comes down to
which technology you are most comfortable with. In both cases, because the tools
are running on the core Docker fabric, they can be used to manage both Windows
and Linux Docker instances. Help on the PowerShell module can be found at
https://github.com/Microsoft/Docker-
PowerShell/tree/master/src/Docker.PowerShell/Help.
To obtain the module, navigate to https://github.com/Microsoft/Docker-
PowerShell and follow the instructions to download and install on the site.

DEPLOYING A NAT NETWORK


To create a new NAT network, you must identify a subnet for the internal network
from which containers will be assigned IP addresses automatically, along with the
vNIC on the container host, to enable the vNIC to act as the gateway and use the NAT
of the container host. I’m going to walk through how to create these, but do not try
this exercise in the RTM of Windows Server 2016, as you can have only one NAT
network per host, and one is created by default. This is for informational uses only at
this time. However, I will cover some additional options.


DOCKER.EXE IS CASE SENSITIVE

Free download pdf