Container Networking

Setting Expectation

  • Not a deep-dive kind
  • Container networking introduction
  • Container network interfaces
  • Network drivers
  • Overlay and docker swarms

No Network Alert!!

Container networking introduction

Network Namespace

A namespace is a way of scoping a particular set of identifiers. Using a namespace, you can use the same identifier multiple times in different namespaces. You can also restrict an identifier set visible to particular processes.

Scott's Weblog

Networking aspects

  • Need to talk to external world
  • Reach container from external world
  • Inter container connectivity within the same host
  • Inter container connectivity across hosts
  • Discover services
  • Loadbalance services
  • Secure multi-tenant services

Evolution

network interfaces

Hell lot of specs

Why kubernetes move with CNI standards? Confession
Guess how then kubernetes supports docker?

Network drivers

Bridge driver


					$ docker run --rm -p 8080:5000  avikjis27/node-server
				

Host only


					$ docker run --rm  --net=host avikjis27/node-server
				

None driver


					$ docker run --rm  --net=none avikjis27/node-server
				

Docker Swarm


					$ vagrant up
				

					$ sudo docker service create --name node-server 
					--replicas 3 --publish published=8080,target=5000 
					avikjis27/node-server