When setting up containers in Azure, you need to choose and set up a container network driver. This driver determines how your containers connect to networks and communicate with each other and with outside services. The right configuration ensures your applications are secure, can scale, and work efficiently.
Azure offers several main types of network drivers, each with different characteristics for how containers get network access. The NAT driver is common; it gives containers private IP addresses and translates their traffic when they need to reach the public internet, which provides a layer of isolation. The Transparent driver connects containers directly to the underlying virtual network, making them appear as regular endpoints on that network without address translation. The L2bridge driver operates at a lower network layer, bridging container traffic at the data-link level, which is useful for more complex networking scenarios that require specific Layer 2 behaviors.
After choosing a driver type, you must configure its specific mode and how IP addresses are assigned. The driver mode controls the fundamental networking behavior, such as whether traffic is translated or bridged. IP assignment can be dynamic, where addresses are automatically given out by Azure, or static, where you manually assign a fixed address to a container. Your choice here depends on the container’s role: dynamic IPs are simpler for scaling, while static IPs are needed for services that other resources depend on to have a consistent address.
To make containers part of your broader Azure infrastructure, you integrate their endpoints into an Azure virtual network. This involves attaching network security groups to control the flow of traffic to and from your containers using rules based on IP addresses, ports, and protocols. You also configure load-balancing settings to distribute incoming network traffic across multiple container instances, which improves application availability and handles higher loads. Proper integration means your containers can securely communicate with other virtual machines and services in the virtual network while being protected by the same security and traffic management policies.
Eager to master hybrid server management? Discover how to administer Windows Server Hybrid Core Infrastructure on Azure, setting your path towards the Microsoft Certified: Azure Hybrid Infrastructure Administrator Associate certification!
Prepare and test your skills

Prepare and test your skills

Azure offers three main container network drivers. The NAT driver gives containers private IP addresses and translates their traffic for public internet access, providing isolation. The Transparent driver connects containers directly to the underlying virtual network without address translation. The L2bridge driver operates at the data-link layer, bridging container traffic for complex networking scenarios requiring specific Layer 2 behaviors.
Dynamic IP assignment is simpler and better suited for scaling, as addresses are automatically given out by Azure. Static IP assignment is needed for services that other resources depend on to have a consistent address, allowing you to manually assign a fixed address to a container.
Network security groups are attached to container endpoints to control the flow of traffic using rules based on IP addresses, ports, and protocols. This allows you to secure container communications while integrating them into the broader Azure virtual network infrastructure.