SlideShare a Scribd company logo
2
Most read
4
Most read
11
Most read
Introduction to
August 24, 2017
Webinar Series
Your Presenters
2
Ken Owens
VP Digital Native Architecture
Mastercard
Bryan Boreham
Director of Engineering,
WeaveWorks
@bboreham
Agenda
What is CNI?
Who uses CNI - runtimes and plugins
Recent developments
The Future
3
CNI in the CNCF Reference Architecture
4
• Resource Management
• Image Management
• Container Management
• Compute Resources
• Cloud Native – Network
• Network Segmentation and Policy
• SDN & APIs (eg CNI, libnetwork)
• Cloud Native- Storage
• Volume Drivers/Plugins
• Local Storage Management
• Remote Storage Access
Application Definition/ Development
Orchestration & Management
Runtime
Provisioning
Infrastructure (Bare Metal/Cloud)
What is CNI?
• The simplest possible interface between container
runtime and network implementation
• Originated at CoreOS as part of Rkt
• Now a CNCF project
5
What is CNI?
6
Net Plugin
Runtime CNI commands and
network config
Config
Configures Network
What does a CNI call look like?
Set some environment variables and go!
CNI_COMMAND=ADD 
CNI_CONTAINERID=$id 
CNI_NETNS=/proc/$pid/ns/net 
CNI_PATH=/opt/cni/bin 
CNI_IFNAME=eth0 
my-plugin < my-config
7
Can be either ADD, DEL or VERSION
A JSON document defining the network
{
"cniVersion": "0.3.0",
"name": "mynet",
"type": "my-plugin",
"some-parameter": "foo",
"ipam": {
"type": "host-local",
"subnet": "10.42.0.0/24",
}
}
What does a CNI config look like?
8
Tells the plugin what version the caller is using
The caller should look for a plugin with this name
First plugin will call a second plugin with this name
Network plugin calls IPAM plugin
9
Net Plugin
Runtime
IPAM Plugin
CNI params and
network config
Passes same params
and network config
Config
CNI project repo
https://github.com/containernetworking/cni
• CNI Specification: the API between runtimes and network plugins
• Conventions: extensions to the API that are not required for all plugins
• Library: a Go implementation of the CNI specification that plugins and
runtimes can use
•5 maintainers
•63 contributors from 10+ companies
•785 stars
10
CNI plugins repo
https://github.com/containernetworking/plugins
Main: interface-creating
• bridge
• ipvlan
• loopback
• macvlan
• ptp
• vlan
IPAM: IP address allocation
• dhcp
• host-local
11
Meta: other plugins
•flannel
•tuning
•portmap
Sample
•The sample plugin provides an
example for building your own
plugin.
3rd party plugins
Weave Net
Project Calico
Contiv
SR-IOV
Cilium
Infoblox
Multus
Romana
CNI-Genie
Container runtimes
rkt - container engine
Kubernetes
Kurma - container runtime
Cloud Foundry - a platform for cloud
applications
Mesos - a distributed systems kernel
Ecosystem
12
Quote
“Our forthcoming ECS Task Networking
capabilities are written as a CNI plugin, and we
expect CNI to be the basis for all container-based
networking on AWS.”
- Adrian Cockroft, VP of Cloud Architecture, AWS
13
Recent developments
• Chaining (new in 0.5)
– Configure a list of plugins, not just one
– Runtime will call each one in turn
– Capability arguments give extra info to the runtime
• IPv6 (completed in 0.6)
– Spec now allows multiple addresses to be returned
– All base plugins support IPv6
14
Chaining config list example
{ "cniVersion": "0.3.0",
"name": "weave",
"plugins": [
{ "type": "weave-net",
"hairpinMode": true
},
{ "type": "portmap",
"capabilities": { "portMappings": true },
"snat": true
}
] }
15
Chaining multiple plugins
16
Net Plugin
Runtime
portmap
Plugin
Includes result from
previous plugin
Config
list
Looking forward
GET command
– For runtime to query the status of an interface
Kubernetes kubenet as pure CNI
– Currently part CNI and part embedded inside kubelet
CNI v1.0
– Stable spec, with strategy and tooling for backwards compatibility
– Complete test coverage
– Release from CI
17
Summary
CNI is a simple interface based on environment variables
and JSON
Open Source, lots of runtimes and plugins use it
We welcome new implementers
Please comment on the spec before 1.0!
18
Thank You
19
https://github.com/containernetworking/cni
Email: cni-dev@googlegroups.com
IRC: #containernetworking channel on
freenode.org
Slack: containernetworking.slack.com

More Related Content

What's hot (20)

PDF
Kubernetes Basics
Eueung Mulyana
 
PDF
An Introduction to Kubernetes
Imesh Gunaratne
 
PDF
Cilium - Bringing the BPF Revolution to Kubernetes Networking and Security
Thomas Graf
 
PDF
Introduction to Kubernetes Workshop
Bob Killen
 
PDF
Red Hat OpenStack 17 저자직강+스터디그룹_2주차
Nalee Jang
 
PPTX
DevOps with Kubernetes
EastBanc Tachnologies
 
PDF
[OpenInfra Days Korea 2018] (Track 4) - Grafana를 이용한 OpenStack 클라우드 성능 모니터링
OpenStack Korea Community
 
PPTX
Kubernetes Workshop
loodse
 
PPTX
01. Kubernetes-PPT.pptx
TamalBanerjee16
 
PDF
Kubernetes 101
Jacopo Nardiello
 
PDF
containerdの概要と最近の機能
Kohei Tokunaga
 
PPTX
Kubernetes 101 for Beginners
Oktay Esgul
 
PDF
Kubernetes
erialc_w
 
PDF
Evolution of containers to kubernetes
Krishna-Kumar
 
PPTX
Service Discovery In Kubernetes
Knoldus Inc.
 
PDF
Replacing iptables with eBPF in Kubernetes with Cilium
Michal Rostecki
 
PDF
(Draft) Kubernetes - A Comprehensive Overview
Bob Killen
 
PPTX
OVN - Basics and deep dive
Trinath Somanchi
 
PDF
Using eBPF for High-Performance Networking in Cilium
ScyllaDB
 
PPTX
Kubernetes Basics
Rishabh Kumar
 
Kubernetes Basics
Eueung Mulyana
 
An Introduction to Kubernetes
Imesh Gunaratne
 
Cilium - Bringing the BPF Revolution to Kubernetes Networking and Security
Thomas Graf
 
Introduction to Kubernetes Workshop
Bob Killen
 
Red Hat OpenStack 17 저자직강+스터디그룹_2주차
Nalee Jang
 
DevOps with Kubernetes
EastBanc Tachnologies
 
[OpenInfra Days Korea 2018] (Track 4) - Grafana를 이용한 OpenStack 클라우드 성능 모니터링
OpenStack Korea Community
 
Kubernetes Workshop
loodse
 
01. Kubernetes-PPT.pptx
TamalBanerjee16
 
Kubernetes 101
Jacopo Nardiello
 
containerdの概要と最近の機能
Kohei Tokunaga
 
Kubernetes 101 for Beginners
Oktay Esgul
 
Kubernetes
erialc_w
 
Evolution of containers to kubernetes
Krishna-Kumar
 
Service Discovery In Kubernetes
Knoldus Inc.
 
Replacing iptables with eBPF in Kubernetes with Cilium
Michal Rostecki
 
(Draft) Kubernetes - A Comprehensive Overview
Bob Killen
 
OVN - Basics and deep dive
Trinath Somanchi
 
Using eBPF for High-Performance Networking in Cilium
ScyllaDB
 
Kubernetes Basics
Rishabh Kumar
 

Similar to Introduction to the Container Network Interface (CNI) (20)

PDF
OSDC 2017 - Casey Callendrello -The evolution of the Container Network Interface
NETWAYS
 
PDF
OSDC 2017 | The evolution of the Container Network Interface by Casey Callend...
NETWAYS
 
PDF
Cloud Native Networking for Containers in AWS using CNI Plugins
aniait
 
PDF
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
Juraj Hantak
 
PPTX
Comparison of existing cni plugins for kubernetes
Adam Hamsik
 
PDF
Container Network Interface: Network Plugins for Kubernetes and beyond
KubeAcademy
 
PDF
Network plugins for kubernetes
inwin stack
 
PDF
KubernetesNetworkingAndImplementation-Lecture.pdf
AnkitShukla661141
 
PDF
Overlay/Underlay - Betting on Container Networking
Lee Calcote
 
PDF
Writing the Container Network Interface(CNI) plugin in golang
HungWei Chiu
 
PDF
Packet walks in_kubernetes-v4
InfraEngineer
 
PPTX
Integrate Kubernetes into CORD(Central Office Re-architected as a Datacenter)
inwin stack
 
PDF
Demystfying container-networking
Balasundaram Natarajan
 
PDF
Container Networking Deep Dive
Open Networking Summit
 
PDF
Azure meetup cloud native concepts - may 28th 2018
Jim Bugwadia
 
PDF
poster
Nimay Desai
 
PPTX
Secure Your Containers: What Network Admins Should Know When Moving Into Prod...
Cynthia Thomas
 
PPTX
Container world hybridnetworking_rev2
Prem Sankar Gopannan
 
PPTX
Docker Networking Overview
Sreenivas Makam
 
OSDC 2017 - Casey Callendrello -The evolution of the Container Network Interface
NETWAYS
 
OSDC 2017 | The evolution of the Container Network Interface by Casey Callend...
NETWAYS
 
Cloud Native Networking for Containers in AWS using CNI Plugins
aniait
 
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
Juraj Hantak
 
Comparison of existing cni plugins for kubernetes
Adam Hamsik
 
Container Network Interface: Network Plugins for Kubernetes and beyond
KubeAcademy
 
Network plugins for kubernetes
inwin stack
 
KubernetesNetworkingAndImplementation-Lecture.pdf
AnkitShukla661141
 
Overlay/Underlay - Betting on Container Networking
Lee Calcote
 
Writing the Container Network Interface(CNI) plugin in golang
HungWei Chiu
 
Packet walks in_kubernetes-v4
InfraEngineer
 
Integrate Kubernetes into CORD(Central Office Re-architected as a Datacenter)
inwin stack
 
Demystfying container-networking
Balasundaram Natarajan
 
Container Networking Deep Dive
Open Networking Summit
 
Azure meetup cloud native concepts - may 28th 2018
Jim Bugwadia
 
poster
Nimay Desai
 
Secure Your Containers: What Network Admins Should Know When Moving Into Prod...
Cynthia Thomas
 
Container world hybridnetworking_rev2
Prem Sankar Gopannan
 
Docker Networking Overview
Sreenivas Makam
 
Ad

More from Weaveworks (20)

PDF
Weave AI Controllers (Weave GitOps Office Hours)
Weaveworks
 
PDF
Flamingo: Expand ArgoCD with Flux (Office Hours)
Weaveworks
 
PDF
Webinar: Capabilities, Confidence and Community – What Flux GA Means for You
Weaveworks
 
PDF
Six Signs You Need Platform Engineering
Weaveworks
 
PDF
SRE and GitOps for Building Robust Kubernetes Platforms.pdf
Weaveworks
 
PDF
Webinar: End to End Security & Operations with Chainguard and Weave GitOps
Weaveworks
 
PDF
Flux Beyond Git Harnessing the Power of OCI
Weaveworks
 
PDF
Automated Provisioning, Management & Cost Control for Kubernetes Clusters
Weaveworks
 
PDF
How to Avoid Kubernetes Multi-tenancy Catastrophes
Weaveworks
 
PDF
Building internal developer platform with EKS and GitOps
Weaveworks
 
PDF
GitOps Testing in Kubernetes with Flux and Testkube.pdf
Weaveworks
 
PDF
Intro to GitOps with Weave GitOps, Flagger and Linkerd
Weaveworks
 
PDF
Implementing Flux for Scale with Soft Multi-tenancy
Weaveworks
 
PDF
Accelerating Hybrid Multistage Delivery with Weave GitOps on EKS
Weaveworks
 
PDF
The Story of Flux Reaching Graduation in the CNCF
Weaveworks
 
PDF
Shift Deployment Security Left with Weave GitOps & Upbound’s Universal Crossp...
Weaveworks
 
PDF
Securing Your App Deployments with Tunnels, OIDC, RBAC, and Progressive Deliv...
Weaveworks
 
PDF
Flux’s Security & Scalability with OCI & Helm Slides.pdf
Weaveworks
 
PDF
Flux Security & Scalability using VS Code GitOps Extension
Weaveworks
 
PDF
Deploying Stateful Applications Securely & Confidently with Ondat & Weave GitOps
Weaveworks
 
Weave AI Controllers (Weave GitOps Office Hours)
Weaveworks
 
Flamingo: Expand ArgoCD with Flux (Office Hours)
Weaveworks
 
Webinar: Capabilities, Confidence and Community – What Flux GA Means for You
Weaveworks
 
Six Signs You Need Platform Engineering
Weaveworks
 
SRE and GitOps for Building Robust Kubernetes Platforms.pdf
Weaveworks
 
Webinar: End to End Security & Operations with Chainguard and Weave GitOps
Weaveworks
 
Flux Beyond Git Harnessing the Power of OCI
Weaveworks
 
Automated Provisioning, Management & Cost Control for Kubernetes Clusters
Weaveworks
 
How to Avoid Kubernetes Multi-tenancy Catastrophes
Weaveworks
 
Building internal developer platform with EKS and GitOps
Weaveworks
 
GitOps Testing in Kubernetes with Flux and Testkube.pdf
Weaveworks
 
Intro to GitOps with Weave GitOps, Flagger and Linkerd
Weaveworks
 
Implementing Flux for Scale with Soft Multi-tenancy
Weaveworks
 
Accelerating Hybrid Multistage Delivery with Weave GitOps on EKS
Weaveworks
 
The Story of Flux Reaching Graduation in the CNCF
Weaveworks
 
Shift Deployment Security Left with Weave GitOps & Upbound’s Universal Crossp...
Weaveworks
 
Securing Your App Deployments with Tunnels, OIDC, RBAC, and Progressive Deliv...
Weaveworks
 
Flux’s Security & Scalability with OCI & Helm Slides.pdf
Weaveworks
 
Flux Security & Scalability using VS Code GitOps Extension
Weaveworks
 
Deploying Stateful Applications Securely & Confidently with Ondat & Weave GitOps
Weaveworks
 
Ad

Recently uploaded (20)

PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PDF
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
PDF
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
PDF
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
PPTX
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
PDF
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PPTX
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PPTX
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
PPTX
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PDF
Online Queue Management System for Public Service Offices in Nepal [Focused i...
Rishab Acharya
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
Revenue streams of the Wazirx clone script.pdf
aaronjeffray
 
Alarm in Android-Scheduling Timed Tasks Using AlarmManager in Android.pdf
Nabin Dhakal
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Human Resources Information System (HRIS)
Amity University, Patna
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
Tally_Basic_Operations_Presentation.pptx
AditiBansal54083
 
Open Chain Q2 Steering Committee Meeting - 2025-06-25
Shane Coughlan
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
Migrating Millions of Users with Debezium, Apache Kafka, and an Acyclic Synch...
MD Sayem Ahmed
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
SAP Firmaya İade ABAB Kodları - ABAB ile yazılmıl hazır kod örneği
Salih Küçük
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
Online Queue Management System for Public Service Offices in Nepal [Focused i...
Rishab Acharya
 

Introduction to the Container Network Interface (CNI)

  • 1. Introduction to August 24, 2017 Webinar Series
  • 2. Your Presenters 2 Ken Owens VP Digital Native Architecture Mastercard Bryan Boreham Director of Engineering, WeaveWorks @bboreham
  • 3. Agenda What is CNI? Who uses CNI - runtimes and plugins Recent developments The Future 3
  • 4. CNI in the CNCF Reference Architecture 4 • Resource Management • Image Management • Container Management • Compute Resources • Cloud Native – Network • Network Segmentation and Policy • SDN & APIs (eg CNI, libnetwork) • Cloud Native- Storage • Volume Drivers/Plugins • Local Storage Management • Remote Storage Access Application Definition/ Development Orchestration & Management Runtime Provisioning Infrastructure (Bare Metal/Cloud)
  • 5. What is CNI? • The simplest possible interface between container runtime and network implementation • Originated at CoreOS as part of Rkt • Now a CNCF project 5
  • 6. What is CNI? 6 Net Plugin Runtime CNI commands and network config Config Configures Network
  • 7. What does a CNI call look like? Set some environment variables and go! CNI_COMMAND=ADD CNI_CONTAINERID=$id CNI_NETNS=/proc/$pid/ns/net CNI_PATH=/opt/cni/bin CNI_IFNAME=eth0 my-plugin < my-config 7 Can be either ADD, DEL or VERSION A JSON document defining the network
  • 8. { "cniVersion": "0.3.0", "name": "mynet", "type": "my-plugin", "some-parameter": "foo", "ipam": { "type": "host-local", "subnet": "10.42.0.0/24", } } What does a CNI config look like? 8 Tells the plugin what version the caller is using The caller should look for a plugin with this name First plugin will call a second plugin with this name
  • 9. Network plugin calls IPAM plugin 9 Net Plugin Runtime IPAM Plugin CNI params and network config Passes same params and network config Config
  • 10. CNI project repo https://github.com/containernetworking/cni • CNI Specification: the API between runtimes and network plugins • Conventions: extensions to the API that are not required for all plugins • Library: a Go implementation of the CNI specification that plugins and runtimes can use •5 maintainers •63 contributors from 10+ companies •785 stars 10
  • 11. CNI plugins repo https://github.com/containernetworking/plugins Main: interface-creating • bridge • ipvlan • loopback • macvlan • ptp • vlan IPAM: IP address allocation • dhcp • host-local 11 Meta: other plugins •flannel •tuning •portmap Sample •The sample plugin provides an example for building your own plugin.
  • 12. 3rd party plugins Weave Net Project Calico Contiv SR-IOV Cilium Infoblox Multus Romana CNI-Genie Container runtimes rkt - container engine Kubernetes Kurma - container runtime Cloud Foundry - a platform for cloud applications Mesos - a distributed systems kernel Ecosystem 12
  • 13. Quote “Our forthcoming ECS Task Networking capabilities are written as a CNI plugin, and we expect CNI to be the basis for all container-based networking on AWS.” - Adrian Cockroft, VP of Cloud Architecture, AWS 13
  • 14. Recent developments • Chaining (new in 0.5) – Configure a list of plugins, not just one – Runtime will call each one in turn – Capability arguments give extra info to the runtime • IPv6 (completed in 0.6) – Spec now allows multiple addresses to be returned – All base plugins support IPv6 14
  • 15. Chaining config list example { "cniVersion": "0.3.0", "name": "weave", "plugins": [ { "type": "weave-net", "hairpinMode": true }, { "type": "portmap", "capabilities": { "portMappings": true }, "snat": true } ] } 15
  • 16. Chaining multiple plugins 16 Net Plugin Runtime portmap Plugin Includes result from previous plugin Config list
  • 17. Looking forward GET command – For runtime to query the status of an interface Kubernetes kubenet as pure CNI – Currently part CNI and part embedded inside kubelet CNI v1.0 – Stable spec, with strategy and tooling for backwards compatibility – Complete test coverage – Release from CI 17
  • 18. Summary CNI is a simple interface based on environment variables and JSON Open Source, lots of runtimes and plugins use it We welcome new implementers Please comment on the spec before 1.0! 18