Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Docker Networking - A Primer

Docker Networking - A Primer

Takes the audience through the range of networking technologies that docker works with.

Vamsee Kanakala

September 15, 2015
Tweet

More Decks by Vamsee Kanakala

Other Decks in Technology

Transcript

  1. Docker Networking - A Primer By Vamsee Kanakala Devops Consultant

    Image © https://denibertovic.com/talks/supercharge-development-env-using-docker/img/what_is_docker.png
  2. Why Docker Networking? • Most docker users know the basics

    of how it works • Massively simplifies building micro-services & SOA • Opens up simpler ways of building distributed systems • Also, a ton of innovation is happening in this area • Of course, heaps of fun! 2
  3. The Basics 1. Bridge networking d o c k e

    r r u n - i t - - n e t = b r i d g e . . . • Sets up d o c k e r 0 and v e t h * • Port mapping d o c k e r r u n - p 8 0 : 8 0 8 0 f o o / a p a c h e . . . • Links d o c k e r r u n - P - - n a m e w e b - - l i n k p g d b : d b . . . • Compose (orchestration) • Pipework 2. Host networking - - n e t = h o s t 3. Mapped Container networking - - n e t = c o n t a i n e r : N A M E _ o r _ I D 3
  4. The Cluster Managers Address and manage a cluster of containers

    as a single system 1. Kubernetes 2. Mesos 3. Docker Swarm “ 4
  5. Kubernetes 1. Pods/Nodes 2. Volumes 3. Replication Controller 4. Labels

    & Selectors 5. Services Image © https://meteorhacks.com/learn-kubernetes-the-future-of-the-cloud 5
  6. Mesos Abstracts CPU, memory, storage away into a single system

    1. Masters • Slaves • Resource Offers 2. Frameworks - Hadoop, Spark, Storm... • Schedulers • Executors “ Image © http://mesos.apache.org/documentation/latest/mesos-architecture/ 6
  7. Docker Swarm Native Docker Clustering 1. Swarm Manager 2. Nodes/Agents

    3. Discovery • Static file: s w a r m m a n a g e - H . . . • Using service discovery tools like etcd, consul, zookeeper 4. Advanced scheduling with strategies (spread, binpack, random) & filters “ Image © http://cloudgeekz.com/538/docker-swarm-native-clustering-for-docker-hosts.html 7
  8. Virtual Network Managers Implement Overlay networking for clusters of containers

    1. Weave 2. Flannel 3. Project Calico 4. Libnetwork “ Image © https://github.com/weaveworks/weave#readme 8
  9. Libnetwork A multi-platform library for networking containers 1. n e

    t w o r k and s e r v i c e become first class objects 2. Create a network: d o c k e r n e t w o r k c r e a t e . . . p r o d 3. Publish a network: d o c k e r s e r v i c e p u b l i s h d b 1 . p r o d 4. Start a container: c i d = $ ( d o c k e r r u n - i t d u b u n t u ) 5. Attach a container: d o c k e r s e r v i c e a t t a c h $ c i d d b 1 . p r o d 6. Networking plugins - Weave, Flocker (volume management) “ 9
  10. What next? Go forth and have fun! Questions? Twitter: @

    v a m s e e Email: v a m s e e @ v i a m e n t i s . c o m Github: g i t h u b . c o m / v a m s e e “ 10