In this blog, we are going to cover the Docker Networking overview, different types of networking i.e bridge networking, host networking, overlay networking, and Macvlan networking.
Note: Docker Networking and its type is part of Docker & Kubernetes to know more about the Docker & Kubernetes Overview click here
Note: To know more about the Certified Kubernetes Administrator certificate exam topics click here and to know more about the activity guides/hands-on lab exercise you should perform to clear the certification exam click here
Networking In Docker Overview
Networking in Docker is to connect the docker container to each other and outside world so they can communicate with each other also they can talk to Docker Host. you can connect docker containers to non-Docker workloads. Docker uses CNM Container Network Model for networking. This model standardizes the steps required to provide networking for containers using multiple network drivers.
Bridge network is a default network created automatically when you deploy a container. Bridge network uses a software bridge that allows containers connected to the same bridge network to communicate. Bridge networks used on containers that are running on the same Docker daemon host. The bridge network creates a private internal isolated network to the host so containers on this network can communicate.
This takes out any network isolation between the docker host and the docker containers. Host mode networking can be useful to optimize performance. It does not require network address translation (NAT).
Note: The host networking driver only works on Linux hosts, and is not supported on Docker Desktop for Mac, Docker Desktop for Windows, or Docker EE for Windows Server.
Overlay networking is used if container on node A wants to talk to node B then to make communication between them we use Overlay networking. Overlay networking uses VXLAN to create an Overlay network. This has the advantage of providing maximum portability across various cloud and on-premises networks. By default, the Overlay network is encrypted with the AES algorithm.
Macvlan network is used to connect applications directly to the physical network. By using the macvlan network driver to assign a MAC address to each container, also allow having full TCP/Ip stack. Then, the Docker daemon routes traffic to containers by their MAC addresses. You can isolate your macvlan networks using different physical network interfaces. This is used in legacy applications which require MAC address.
- Docker Networking & Type Documentation
- [Video] Containers (Docker) & Kubernetes In Azure For Beginners
- Kubernetes Architecture & Components Overview For Beginners
- Docker Image And Layer Overview For Beginners
Join FREE Masterclass
To know about what is the Roles and Responsibilities of Kubernetes administrator, why you should learn Docker and Kubernetes, Job opportunities for Kubernetes administrator in the market, and what to study Including Hands-On labs you must perform to clear CKA certification Exam by registering for our FREE Masterclass.