SlideShare uma empresa Scribd logo
1 de 39
Baixar para ler offline
Dive into CNI: 

Network Plugins for Kubernetes
林哲緯, Intern, Linker Networks
Who am I?
• Intern, Linker Networks Inc.
• github.com/John-Lin
• @johnlin__
2
Outline
• CNI
• CNI Introduction
• How to Build?
• How to Use?
• Linen CNI
• Linen CNI Introduction
• Kubernetes & Linen CNI
• Distinguish between OVN-Kubernetes and Linen CNI
3
CNI
4
What is CNI?
• CNI - the Container Network Interface
• A Open Source Project supported by CNCF (Cloud Native
Computing Foundation) and it has two main repositories
• containernetworking/cni: libraries for writing plugins to
configure network interfaces
• containernetworking/plugins: additional CNI network
plugins
• Support rkt, Docker, Kubernetes, OpenShift and Mesos
5
What is CNI?
• CNI (Container Network Interface) is an API for writing
plugins to configure network interfaces in Linux
containers
6
CNI Spec
• 3 Commands: ADD, DELETE, and VERSION
• Configuration on stdin, results on stdout
• Runtime parameters via env. CNI_ARGS & CAP_ARGS
7
How to Build?
• parseConf: parses the network configuration from stdin
• cmdAdd is called for ADD requests 

(When pod is created)
• cmdDel is called for DELETE requests 

(When pod is deleted)
• Add your code to the cmdAdd and cmdDel functions.
• Simple CNI code sample at :

https://github.com/containernetworking/plugins/tree/master/plugins/sample
8
type PluginConf
func parseConfig(stdin []byte) (*PluginConf, error)
func cmdAdd(args *skel.CmdArgs) error
func cmdDel(args *skel.CmdArgs) error
CNI Quick Start
$ cat mybridge.conf
{
"name": "mynet",
"type": "bridge",
"ipam": {
"type": "host-local",
"subnet": "10.15.20.0/24"
}
}
9
CNI Quick Start
$ sudo ip netns add ns1
$ sudo CNI_COMMAND=ADD 
CNI_CONTAINERID=ns1 
CNI_NETNS=/var/run/netns/ns1 
CNI_IFNAME=eth2 
CNI_PATH=`pwd` ./bridge <mybridge.conf
$ sudo docker run --name cnitest --net=none 
-d busybox
Or
10
Bridge
11
CNI Plugins
• bridge : Create a bridge adds the host and the container to it
• IPAM : IP address allocation
• host-local : maintains a local database of allocated IPs
• DHCP : Runs a daemon on the host to make DHCP requests on
behalf of the container
• Flannel: responsible for providing a layer 3 IPv4 network between
multiple nodes in a cluster
• Huge variety of different types plugins, such as loopback, PTP,
IPVLAN, MACVLAN, etc.
12
3rd Party Plugins
• Project Calico - a layer 3 virtual network
• Weave - a multi-host Docker network
• Multus - a Multi plugin
• CNI-Genie - generic CNI network plugin
• Silk - a CNI plugin designed for Cloud Foundry
• Linen - designed for overlay networks and compatible with
OpenFlow protocol through Open vSwitch
• More than 10 third-party party plugins !!
13
Linen CNI
14
What is Linen CNI?
A 3rd party CNI plugins designed for “Overlay Networks” and
compatible with “OpenFlow Protocol” through Open vSwitch
15
Overlay Network
16
• Underlay network (built using physical devices and links)
• Create a new virtual network topology on top of underlay
• GRE tunnel, VxLAN tunnel, MPLS and VPN
Underlay Network
Comparison of 

multi-host networking
17
Comparison of multi-host overlay networking solutions
Calico Flannel Weave
Docker 

Overlay Network
Network
Model
Pure Layer-3
Solution
VxLAN or 

UDP Channel
VxLAN or UDP 

Channel
VxLAN
Protocol
Support
TCP, UDP, ICMP
& ICMPv6
ALL ALL ALL
Reference from Battlefield: Calico, Flannel, Weave and Docker Overlay Network
Why Open vSwitch?
18
• Multi-host overlay networking
• Provide flexible network management
• Boosts packet processing, performance and throughput
Multi-host Overlay Networking
19
• All containers can communicate with all other containers
• All nodes can communicate with all containers (and vice-versa)
Network Management
20
• Support SDN controller
to manage flow control
to the switches
Performance
21
• Open vSwitch with the
Data Plane Development
Kit (OvS-DPDK)
• Intel DPDK accelerated
switching and packet
processing
Linen CNI Overview
22
Linen CNI is
• designed to meet the requirements of overlay networks
and compatible with OpenFlow protocol
• inspired by the document from Kubernetes OVS
networking
• a chained plugin and it depends on bridge plugin
Linen CNI Usage
23
On Host1:
$ ip netns add ns1
$ ip netns exec ns1 ip link
1: lo: <LOOPBACK> ...
$ CNI_PATH=`pwd` NETCONFPATH=/root ./cnitool 
add mynet /var/run/netns/ns1
$ ip netns exec ns1 ip link
1: lo: <LOOPBACK> ...
3: eth0@if97:
<BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1400 ...
24
Linen CNI Usage
25
On Host2:
$ ip netns add ns2
$ ip netns exec ns2 ip link
1: lo: <LOOPBACK> ...
$ CNI_PATH=`pwd` NETCONFPATH=/root ./cnitool 
add mynet /var/run/netns/ns2
$ ip netns exec ns2 ip link
1: lo: <LOOPBACK> ...
3: eth0@if100:
<BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1400 …
26
Linen CNI Usage
27
# ON HOST 1
$ ip netns exec ns1 ip address
3: eth0@if97: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1400 ...
...
inet 10.244.1.17/16 scope global eth0
...
# ON HOST 2
$ ip netns exec ns2 ping 10.244.1.17
PING 10.244.1.17 (10.244.1.17) 56(84) bytes of data.
64 bytes from 10.244.1.17: icmp_seq=1 ttl=64 time=0.089 ms
64 bytes from 10.244.1.17: icmp_seq=2 ttl=64 time=0.037 ms
ping to verify network connectivity
Kubernetes & 

Linen CNI
28
Kubernetes & Linen CNI
29
• Management Workflow
• Packet Processing
Management Workflow
30
• linen-cni: Executed by
the container runtime
and set up the network
stack for containers
• flax daemon:
DaemonSet. Runs on
each host in order to
discover new nodes
joining and manipulate
ovsdb
Packet Processing
31
• The docker bridge is
replaced with linux
bridge (kbr0)
• OVS bridge is created
(obr0) and added as a
port to the kbr0 bridge
• All OVS bridges across
all nodes are linked
with VxLAN tunnels
Installation on K8S
32
• The Open vSwitch is required
• kubelet setting
kubelet ... --network-plugin=cni 
--cni-conf-dir=/etc/cni/net.d 
--cni-bin-dir=/opt/cni/bin
Installation on K8S
33
• Create a configuration list file in /etc/cni/net.d and
file name must be name with linen.conflist
• Make sure linen, bridge and host-local binaries are
in /opt/cni/bin
• (Optional) Apply a Daemon Set flaxd.yaml to discover
new node joining
Network configuration reference
34
• ovsBridge: name
of the ovs bridge to
use/create
• vtepIPs: list of the
VxLAN tunnel end
point IP addresses
• controller: sets
SDN controller,
assigns an IP
address, port
number
{
"name":"mynet",
"cniVersion": "0.3.1",
"plugins":[
{
//… bridge configurations
},
{
"type":"linen",
"runtimeConfig":{
"ovs":{
"ovsBridge":"br0",
"vtepIPs":[
"172.120.71.50"
],
"controller":"192.168.2.100:6653"
}
}
}
]
}
Distinguish between
OVN-Kubernetes and Linen CNI
35
Linen CNI
36
OVN-Kubernetes Overlay
37
• K8S Switches (1 per node): In node networking
• K8S Router: Cross-node networking
• Join Switch
• External Router: access external network (NAT)
• External Switch
Network Models
38
Comparison of multi-host overlay networking solutions
Calico OVN-Kubernetes Flannel Linen
Network 

Model
Layer-3 Solution Layer-3 Solution
VxLAN or 

UDP Channel
VxLAN
Performance High High Medium Medium
Complexity High High Low Low
Takeaway
39
More network virtualization projects
https://github.com/John-Lin/linen-cni
@johnlin__
SDN-DS.TW: https://www.facebook.com/groups/sdnds.tw/
Contact me
https://github.com/John-Lin/tinynet
39

Mais conteúdo relacionado

Mais procurados

Docker Networking with Container Orchestration Engines [Docker Meetup Santa C...
Docker Networking with Container Orchestration Engines [Docker Meetup Santa C...Docker Networking with Container Orchestration Engines [Docker Meetup Santa C...
Docker Networking with Container Orchestration Engines [Docker Meetup Santa C...Debra Robertson
 
Container Network Interface: Network Plugins for Kubernetes and beyond
Container Network Interface: Network Plugins for Kubernetes and beyondContainer Network Interface: Network Plugins for Kubernetes and beyond
Container Network Interface: Network Plugins for Kubernetes and beyondKubeAcademy
 
Integrate Kubernetes into CORD(Central Office Re-architected as a Datacenter)
Integrate Kubernetes into CORD(Central Office Re-architected as a Datacenter)Integrate Kubernetes into CORD(Central Office Re-architected as a Datacenter)
Integrate Kubernetes into CORD(Central Office Re-architected as a Datacenter)inwin stack
 
Kubernetes 架構與虛擬化之差異
Kubernetes 架構與虛擬化之差異Kubernetes 架構與虛擬化之差異
Kubernetes 架構與虛擬化之差異inwin stack
 
Virtualization inside kubernetes
Virtualization inside kubernetesVirtualization inside kubernetes
Virtualization inside kubernetesinwin stack
 
Raspberry pi x kubernetes x tensorflow
Raspberry pi x kubernetes x tensorflowRaspberry pi x kubernetes x tensorflow
Raspberry pi x kubernetes x tensorflow霈萱 蔡
 
Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)HungWei Chiu
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes NetworkingCJ Cullen
 
Kubernetes on the Edge / 在邊緣的K8S
Kubernetes on the Edge / 在邊緣的K8SKubernetes on the Edge / 在邊緣的K8S
Kubernetes on the Edge / 在邊緣的K8SYi-Fu Ciou
 
Load Balancing 101
Load Balancing 101Load Balancing 101
Load Balancing 101HungWei Chiu
 
Writing the Container Network Interface(CNI) plugin in golang
Writing the Container Network Interface(CNI) plugin in golangWriting the Container Network Interface(CNI) plugin in golang
Writing the Container Network Interface(CNI) plugin in golangHungWei Chiu
 
Kubernetes networking: Introduction to overlay networks, communication models...
Kubernetes networking: Introduction to overlay networks, communication models...Kubernetes networking: Introduction to overlay networks, communication models...
Kubernetes networking: Introduction to overlay networks, communication models...Murat Mukhtarov
 
Docker Multi Host Networking, Rachit Arora, IBM
Docker Multi Host Networking, Rachit Arora, IBMDocker Multi Host Networking, Rachit Arora, IBM
Docker Multi Host Networking, Rachit Arora, IBMNeependra Khare
 
Introduction of eBPF - 時下最夯的Linux Technology
Introduction of eBPF - 時下最夯的Linux Technology Introduction of eBPF - 時下最夯的Linux Technology
Introduction of eBPF - 時下最夯的Linux Technology Jace Liang
 
How to build a Kubernetes networking solution from scratch
How to build a Kubernetes networking solution from scratchHow to build a Kubernetes networking solution from scratch
How to build a Kubernetes networking solution from scratchAll Things Open
 
Application-Based Routing
Application-Based RoutingApplication-Based Routing
Application-Based RoutingHungWei Chiu
 
IP Virtual Server(IPVS) 101
IP Virtual Server(IPVS) 101IP Virtual Server(IPVS) 101
IP Virtual Server(IPVS) 101HungWei Chiu
 
Container Runtimes and Tooling
Container Runtimes and ToolingContainer Runtimes and Tooling
Container Runtimes and ToolingKublr
 
Docker Meetup: Docker Networking 1.11, by Madhu Venugopal
Docker Meetup: Docker Networking 1.11, by Madhu VenugopalDocker Meetup: Docker Networking 1.11, by Madhu Venugopal
Docker Meetup: Docker Networking 1.11, by Madhu VenugopalMichelle Antebi
 
How to Integrate Kubernetes in OpenStack
 How to Integrate Kubernetes in OpenStack  How to Integrate Kubernetes in OpenStack
How to Integrate Kubernetes in OpenStack Meng-Ze Lee
 

Mais procurados (20)

Docker Networking with Container Orchestration Engines [Docker Meetup Santa C...
Docker Networking with Container Orchestration Engines [Docker Meetup Santa C...Docker Networking with Container Orchestration Engines [Docker Meetup Santa C...
Docker Networking with Container Orchestration Engines [Docker Meetup Santa C...
 
Container Network Interface: Network Plugins for Kubernetes and beyond
Container Network Interface: Network Plugins for Kubernetes and beyondContainer Network Interface: Network Plugins for Kubernetes and beyond
Container Network Interface: Network Plugins for Kubernetes and beyond
 
Integrate Kubernetes into CORD(Central Office Re-architected as a Datacenter)
Integrate Kubernetes into CORD(Central Office Re-architected as a Datacenter)Integrate Kubernetes into CORD(Central Office Re-architected as a Datacenter)
Integrate Kubernetes into CORD(Central Office Re-architected as a Datacenter)
 
Kubernetes 架構與虛擬化之差異
Kubernetes 架構與虛擬化之差異Kubernetes 架構與虛擬化之差異
Kubernetes 架構與虛擬化之差異
 
Virtualization inside kubernetes
Virtualization inside kubernetesVirtualization inside kubernetes
Virtualization inside kubernetes
 
Raspberry pi x kubernetes x tensorflow
Raspberry pi x kubernetes x tensorflowRaspberry pi x kubernetes x tensorflow
Raspberry pi x kubernetes x tensorflow
 
Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)Build Your Own CaaS (Container as a Service)
Build Your Own CaaS (Container as a Service)
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes Networking
 
Kubernetes on the Edge / 在邊緣的K8S
Kubernetes on the Edge / 在邊緣的K8SKubernetes on the Edge / 在邊緣的K8S
Kubernetes on the Edge / 在邊緣的K8S
 
Load Balancing 101
Load Balancing 101Load Balancing 101
Load Balancing 101
 
Writing the Container Network Interface(CNI) plugin in golang
Writing the Container Network Interface(CNI) plugin in golangWriting the Container Network Interface(CNI) plugin in golang
Writing the Container Network Interface(CNI) plugin in golang
 
Kubernetes networking: Introduction to overlay networks, communication models...
Kubernetes networking: Introduction to overlay networks, communication models...Kubernetes networking: Introduction to overlay networks, communication models...
Kubernetes networking: Introduction to overlay networks, communication models...
 
Docker Multi Host Networking, Rachit Arora, IBM
Docker Multi Host Networking, Rachit Arora, IBMDocker Multi Host Networking, Rachit Arora, IBM
Docker Multi Host Networking, Rachit Arora, IBM
 
Introduction of eBPF - 時下最夯的Linux Technology
Introduction of eBPF - 時下最夯的Linux Technology Introduction of eBPF - 時下最夯的Linux Technology
Introduction of eBPF - 時下最夯的Linux Technology
 
How to build a Kubernetes networking solution from scratch
How to build a Kubernetes networking solution from scratchHow to build a Kubernetes networking solution from scratch
How to build a Kubernetes networking solution from scratch
 
Application-Based Routing
Application-Based RoutingApplication-Based Routing
Application-Based Routing
 
IP Virtual Server(IPVS) 101
IP Virtual Server(IPVS) 101IP Virtual Server(IPVS) 101
IP Virtual Server(IPVS) 101
 
Container Runtimes and Tooling
Container Runtimes and ToolingContainer Runtimes and Tooling
Container Runtimes and Tooling
 
Docker Meetup: Docker Networking 1.11, by Madhu Venugopal
Docker Meetup: Docker Networking 1.11, by Madhu VenugopalDocker Meetup: Docker Networking 1.11, by Madhu Venugopal
Docker Meetup: Docker Networking 1.11, by Madhu Venugopal
 
How to Integrate Kubernetes in OpenStack
 How to Integrate Kubernetes in OpenStack  How to Integrate Kubernetes in OpenStack
How to Integrate Kubernetes in OpenStack
 

Semelhante a Network plugins for kubernetes

Secure Your Containers: What Network Admins Should Know When Moving Into Prod...
Secure Your Containers: What Network Admins Should Know When Moving Into Prod...Secure Your Containers: What Network Admins Should Know When Moving Into Prod...
Secure Your Containers: What Network Admins Should Know When Moving Into Prod...Cynthia Thomas
 
99cloud Docker Training module 2
99cloud Docker Training module 299cloud Docker Training module 2
99cloud Docker Training module 2Liang Bo
 
Docker Networking in OpenStack: What you need to know now
Docker Networking in OpenStack: What you need to know nowDocker Networking in OpenStack: What you need to know now
Docker Networking in OpenStack: What you need to know nowPLUMgrid
 
Comparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetesComparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetesAdam Hamsik
 
Introduction to the Container Network Interface (CNI)
Introduction to the Container Network Interface (CNI)Introduction to the Container Network Interface (CNI)
Introduction to the Container Network Interface (CNI)Weaveworks
 
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetesJuraj Hantak
 
"One network to rule them all" - OpenStack Summit Austin 2016
"One network to rule them all" - OpenStack Summit Austin 2016"One network to rule them all" - OpenStack Summit Austin 2016
"One network to rule them all" - OpenStack Summit Austin 2016Phil Estes
 
Container world hybridnetworking_rev2
Container world hybridnetworking_rev2Container world hybridnetworking_rev2
Container world hybridnetworking_rev2Prem Sankar Gopannan
 
KuberNETes - meetup
KuberNETes - meetupKuberNETes - meetup
KuberNETes - meetupNathan Ness
 
DockerCon SF 2015: Networking Breakout
DockerCon SF 2015: Networking BreakoutDockerCon SF 2015: Networking Breakout
DockerCon SF 2015: Networking BreakoutDocker, Inc.
 
Docker Networking : 0 to 60mph slides
Docker Networking : 0 to 60mph slidesDocker Networking : 0 to 60mph slides
Docker Networking : 0 to 60mph slidesDocker, Inc.
 
DockerCon SF 2015: Networking Breakout
DockerCon SF 2015: Networking BreakoutDockerCon SF 2015: Networking Breakout
DockerCon SF 2015: Networking BreakoutDocker, Inc.
 
Docker Online Meetup #22: Docker Networking
Docker Online Meetup #22: Docker NetworkingDocker Online Meetup #22: Docker Networking
Docker Online Meetup #22: Docker NetworkingDocker, Inc.
 
DockerCon EU 2018 Workshop: Container Networking for Swarm and Kubernetes in ...
DockerCon EU 2018 Workshop: Container Networking for Swarm and Kubernetes in ...DockerCon EU 2018 Workshop: Container Networking for Swarm and Kubernetes in ...
DockerCon EU 2018 Workshop: Container Networking for Swarm and Kubernetes in ...Guillaume Morini
 
Kubernetes networking - basics
Kubernetes networking - basicsKubernetes networking - basics
Kubernetes networking - basicsJuraj Hantak
 
Open stackaustinmeetupsept21
Open stackaustinmeetupsept21Open stackaustinmeetupsept21
Open stackaustinmeetupsept21Brent Doncaster
 
Kubernetes Networking 101 kubecon EU 2022
Kubernetes Networking 101 kubecon EU 2022Kubernetes Networking 101 kubecon EU 2022
Kubernetes Networking 101 kubecon EU 2022ssuser1490e8
 
Overview of OpenDaylight Container Orchestration Engine Integration
Overview of OpenDaylight Container Orchestration Engine IntegrationOverview of OpenDaylight Container Orchestration Engine Integration
Overview of OpenDaylight Container Orchestration Engine IntegrationMichelle Holley
 
DevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes IntegrationDevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes IntegrationHank Preston
 

Semelhante a Network plugins for kubernetes (20)

Secure Your Containers: What Network Admins Should Know When Moving Into Prod...
Secure Your Containers: What Network Admins Should Know When Moving Into Prod...Secure Your Containers: What Network Admins Should Know When Moving Into Prod...
Secure Your Containers: What Network Admins Should Know When Moving Into Prod...
 
99cloud Docker Training module 2
99cloud Docker Training module 299cloud Docker Training module 2
99cloud Docker Training module 2
 
Docker Networking in OpenStack: What you need to know now
Docker Networking in OpenStack: What you need to know nowDocker Networking in OpenStack: What you need to know now
Docker Networking in OpenStack: What you need to know now
 
Comparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetesComparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetes
 
Introduction to the Container Network Interface (CNI)
Introduction to the Container Network Interface (CNI)Introduction to the Container Network Interface (CNI)
Introduction to the Container Network Interface (CNI)
 
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
 
"One network to rule them all" - OpenStack Summit Austin 2016
"One network to rule them all" - OpenStack Summit Austin 2016"One network to rule them all" - OpenStack Summit Austin 2016
"One network to rule them all" - OpenStack Summit Austin 2016
 
Container world hybridnetworking_rev2
Container world hybridnetworking_rev2Container world hybridnetworking_rev2
Container world hybridnetworking_rev2
 
KuberNETes - meetup
KuberNETes - meetupKuberNETes - meetup
KuberNETes - meetup
 
DockerCon SF 2015: Networking Breakout
DockerCon SF 2015: Networking BreakoutDockerCon SF 2015: Networking Breakout
DockerCon SF 2015: Networking Breakout
 
Docker Networking : 0 to 60mph slides
Docker Networking : 0 to 60mph slidesDocker Networking : 0 to 60mph slides
Docker Networking : 0 to 60mph slides
 
DockerCon SF 2015: Networking Breakout
DockerCon SF 2015: Networking BreakoutDockerCon SF 2015: Networking Breakout
DockerCon SF 2015: Networking Breakout
 
Kubernetes networks
Kubernetes networksKubernetes networks
Kubernetes networks
 
Docker Online Meetup #22: Docker Networking
Docker Online Meetup #22: Docker NetworkingDocker Online Meetup #22: Docker Networking
Docker Online Meetup #22: Docker Networking
 
DockerCon EU 2018 Workshop: Container Networking for Swarm and Kubernetes in ...
DockerCon EU 2018 Workshop: Container Networking for Swarm and Kubernetes in ...DockerCon EU 2018 Workshop: Container Networking for Swarm and Kubernetes in ...
DockerCon EU 2018 Workshop: Container Networking for Swarm and Kubernetes in ...
 
Kubernetes networking - basics
Kubernetes networking - basicsKubernetes networking - basics
Kubernetes networking - basics
 
Open stackaustinmeetupsept21
Open stackaustinmeetupsept21Open stackaustinmeetupsept21
Open stackaustinmeetupsept21
 
Kubernetes Networking 101 kubecon EU 2022
Kubernetes Networking 101 kubecon EU 2022Kubernetes Networking 101 kubecon EU 2022
Kubernetes Networking 101 kubecon EU 2022
 
Overview of OpenDaylight Container Orchestration Engine Integration
Overview of OpenDaylight Container Orchestration Engine IntegrationOverview of OpenDaylight Container Orchestration Engine Integration
Overview of OpenDaylight Container Orchestration Engine Integration
 
DevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes IntegrationDevNetCreate - ACI and Kubernetes Integration
DevNetCreate - ACI and Kubernetes Integration
 

Mais de inwin stack

Migrating to Cloud Native Solutions
Migrating to Cloud Native SolutionsMigrating to Cloud Native Solutions
Migrating to Cloud Native Solutionsinwin stack
 
Cloud Native 下的應用網路設計
Cloud Native 下的應用網路設計Cloud Native 下的應用網路設計
Cloud Native 下的應用網路設計inwin stack
 
當電子發票遇見 Google Cloud Function
當電子發票遇見 Google Cloud Function當電子發票遇見 Google Cloud Function
當電子發票遇見 Google Cloud Functioninwin stack
 
運用高效、敏捷全新平台極速落實雲原生開發
運用高效、敏捷全新平台極速落實雲原生開發運用高效、敏捷全新平台極速落實雲原生開發
運用高效、敏捷全新平台極速落實雲原生開發inwin stack
 
The last mile of digital transformation AI大眾化:數位轉型的最後一哩
The last mile of digital transformation AI大眾化:數位轉型的最後一哩The last mile of digital transformation AI大眾化:數位轉型的最後一哩
The last mile of digital transformation AI大眾化:數位轉型的最後一哩inwin stack
 
整合Cloud Foundry 和 Kubernetes 技術打造企業級雲應用平台解決方案
整合Cloud Foundry 和 Kubernetes 技術打造企業級雲應用平台解決方案整合Cloud Foundry 和 Kubernetes 技術打造企業級雲應用平台解決方案
整合Cloud Foundry 和 Kubernetes 技術打造企業級雲應用平台解決方案inwin stack
 
An Open, Open source way to enable your Cloud Native Journey
An Open, Open source way to enable your Cloud Native JourneyAn Open, Open source way to enable your Cloud Native Journey
An Open, Open source way to enable your Cloud Native Journeyinwin stack
 
維運Kubernetes的兩三事
維運Kubernetes的兩三事維運Kubernetes的兩三事
維運Kubernetes的兩三事inwin stack
 
Serverless framework on kubernetes
Serverless framework on kubernetesServerless framework on kubernetes
Serverless framework on kubernetesinwin stack
 
Train.IO 【第六期-OpenStack 二三事】
Train.IO 【第六期-OpenStack 二三事】Train.IO 【第六期-OpenStack 二三事】
Train.IO 【第六期-OpenStack 二三事】inwin stack
 
Web後端技術的演變
Web後端技術的演變Web後端技術的演變
Web後端技術的演變inwin stack
 
以 Kubernetes 部屬 Spark 大數據計算環境
以 Kubernetes 部屬 Spark 大數據計算環境以 Kubernetes 部屬 Spark 大數據計算環境
以 Kubernetes 部屬 Spark 大數據計算環境inwin stack
 
Setup Hybrid Clusters Using Kubernetes Federation
Setup Hybrid Clusters Using Kubernetes FederationSetup Hybrid Clusters Using Kubernetes Federation
Setup Hybrid Clusters Using Kubernetes Federationinwin stack
 
基於 K8S 開發的 FaaS 專案 - riff
基於 K8S 開發的 FaaS 專案 - riff基於 K8S 開發的 FaaS 專案 - riff
基於 K8S 開發的 FaaS 專案 - riffinwin stack
 
使用 Prometheus 監控 Kubernetes Cluster
使用 Prometheus 監控 Kubernetes Cluster 使用 Prometheus 監控 Kubernetes Cluster
使用 Prometheus 監控 Kubernetes Cluster inwin stack
 
Extend the Kubernetes API with CRD and Custom API Server
Extend the Kubernetes API with CRD and Custom API ServerExtend the Kubernetes API with CRD and Custom API Server
Extend the Kubernetes API with CRD and Custom API Serverinwin stack
 
利用K8S實現高可靠應用
利用K8S實現高可靠應用利用K8S實現高可靠應用
利用K8S實現高可靠應用inwin stack
 
Distributed tensorflow on kubernetes
Distributed tensorflow on kubernetesDistributed tensorflow on kubernetes
Distributed tensorflow on kubernetesinwin stack
 
Build your own kubernetes apiserver and resource type
Build your own kubernetes apiserver and resource typeBuild your own kubernetes apiserver and resource type
Build your own kubernetes apiserver and resource typeinwin stack
 
利用K8S實現高可靠應用
利用K8S實現高可靠應用利用K8S實現高可靠應用
利用K8S實現高可靠應用inwin stack
 

Mais de inwin stack (20)

Migrating to Cloud Native Solutions
Migrating to Cloud Native SolutionsMigrating to Cloud Native Solutions
Migrating to Cloud Native Solutions
 
Cloud Native 下的應用網路設計
Cloud Native 下的應用網路設計Cloud Native 下的應用網路設計
Cloud Native 下的應用網路設計
 
當電子發票遇見 Google Cloud Function
當電子發票遇見 Google Cloud Function當電子發票遇見 Google Cloud Function
當電子發票遇見 Google Cloud Function
 
運用高效、敏捷全新平台極速落實雲原生開發
運用高效、敏捷全新平台極速落實雲原生開發運用高效、敏捷全新平台極速落實雲原生開發
運用高效、敏捷全新平台極速落實雲原生開發
 
The last mile of digital transformation AI大眾化:數位轉型的最後一哩
The last mile of digital transformation AI大眾化:數位轉型的最後一哩The last mile of digital transformation AI大眾化:數位轉型的最後一哩
The last mile of digital transformation AI大眾化:數位轉型的最後一哩
 
整合Cloud Foundry 和 Kubernetes 技術打造企業級雲應用平台解決方案
整合Cloud Foundry 和 Kubernetes 技術打造企業級雲應用平台解決方案整合Cloud Foundry 和 Kubernetes 技術打造企業級雲應用平台解決方案
整合Cloud Foundry 和 Kubernetes 技術打造企業級雲應用平台解決方案
 
An Open, Open source way to enable your Cloud Native Journey
An Open, Open source way to enable your Cloud Native JourneyAn Open, Open source way to enable your Cloud Native Journey
An Open, Open source way to enable your Cloud Native Journey
 
維運Kubernetes的兩三事
維運Kubernetes的兩三事維運Kubernetes的兩三事
維運Kubernetes的兩三事
 
Serverless framework on kubernetes
Serverless framework on kubernetesServerless framework on kubernetes
Serverless framework on kubernetes
 
Train.IO 【第六期-OpenStack 二三事】
Train.IO 【第六期-OpenStack 二三事】Train.IO 【第六期-OpenStack 二三事】
Train.IO 【第六期-OpenStack 二三事】
 
Web後端技術的演變
Web後端技術的演變Web後端技術的演變
Web後端技術的演變
 
以 Kubernetes 部屬 Spark 大數據計算環境
以 Kubernetes 部屬 Spark 大數據計算環境以 Kubernetes 部屬 Spark 大數據計算環境
以 Kubernetes 部屬 Spark 大數據計算環境
 
Setup Hybrid Clusters Using Kubernetes Federation
Setup Hybrid Clusters Using Kubernetes FederationSetup Hybrid Clusters Using Kubernetes Federation
Setup Hybrid Clusters Using Kubernetes Federation
 
基於 K8S 開發的 FaaS 專案 - riff
基於 K8S 開發的 FaaS 專案 - riff基於 K8S 開發的 FaaS 專案 - riff
基於 K8S 開發的 FaaS 專案 - riff
 
使用 Prometheus 監控 Kubernetes Cluster
使用 Prometheus 監控 Kubernetes Cluster 使用 Prometheus 監控 Kubernetes Cluster
使用 Prometheus 監控 Kubernetes Cluster
 
Extend the Kubernetes API with CRD and Custom API Server
Extend the Kubernetes API with CRD and Custom API ServerExtend the Kubernetes API with CRD and Custom API Server
Extend the Kubernetes API with CRD and Custom API Server
 
利用K8S實現高可靠應用
利用K8S實現高可靠應用利用K8S實現高可靠應用
利用K8S實現高可靠應用
 
Distributed tensorflow on kubernetes
Distributed tensorflow on kubernetesDistributed tensorflow on kubernetes
Distributed tensorflow on kubernetes
 
Build your own kubernetes apiserver and resource type
Build your own kubernetes apiserver and resource typeBuild your own kubernetes apiserver and resource type
Build your own kubernetes apiserver and resource type
 
利用K8S實現高可靠應用
利用K8S實現高可靠應用利用K8S實現高可靠應用
利用K8S實現高可靠應用
 

Último

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 

Último (20)

Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 

Network plugins for kubernetes

  • 1. Dive into CNI: 
 Network Plugins for Kubernetes 林哲緯, Intern, Linker Networks
  • 2. Who am I? • Intern, Linker Networks Inc. • github.com/John-Lin • @johnlin__ 2
  • 3. Outline • CNI • CNI Introduction • How to Build? • How to Use? • Linen CNI • Linen CNI Introduction • Kubernetes & Linen CNI • Distinguish between OVN-Kubernetes and Linen CNI 3
  • 5. What is CNI? • CNI - the Container Network Interface • A Open Source Project supported by CNCF (Cloud Native Computing Foundation) and it has two main repositories • containernetworking/cni: libraries for writing plugins to configure network interfaces • containernetworking/plugins: additional CNI network plugins • Support rkt, Docker, Kubernetes, OpenShift and Mesos 5
  • 6. What is CNI? • CNI (Container Network Interface) is an API for writing plugins to configure network interfaces in Linux containers 6
  • 7. CNI Spec • 3 Commands: ADD, DELETE, and VERSION • Configuration on stdin, results on stdout • Runtime parameters via env. CNI_ARGS & CAP_ARGS 7
  • 8. How to Build? • parseConf: parses the network configuration from stdin • cmdAdd is called for ADD requests 
 (When pod is created) • cmdDel is called for DELETE requests 
 (When pod is deleted) • Add your code to the cmdAdd and cmdDel functions. • Simple CNI code sample at :
 https://github.com/containernetworking/plugins/tree/master/plugins/sample 8 type PluginConf func parseConfig(stdin []byte) (*PluginConf, error) func cmdAdd(args *skel.CmdArgs) error func cmdDel(args *skel.CmdArgs) error
  • 9. CNI Quick Start $ cat mybridge.conf { "name": "mynet", "type": "bridge", "ipam": { "type": "host-local", "subnet": "10.15.20.0/24" } } 9
  • 10. CNI Quick Start $ sudo ip netns add ns1 $ sudo CNI_COMMAND=ADD CNI_CONTAINERID=ns1 CNI_NETNS=/var/run/netns/ns1 CNI_IFNAME=eth2 CNI_PATH=`pwd` ./bridge <mybridge.conf $ sudo docker run --name cnitest --net=none -d busybox Or 10
  • 12. CNI Plugins • bridge : Create a bridge adds the host and the container to it • IPAM : IP address allocation • host-local : maintains a local database of allocated IPs • DHCP : Runs a daemon on the host to make DHCP requests on behalf of the container • Flannel: responsible for providing a layer 3 IPv4 network between multiple nodes in a cluster • Huge variety of different types plugins, such as loopback, PTP, IPVLAN, MACVLAN, etc. 12
  • 13. 3rd Party Plugins • Project Calico - a layer 3 virtual network • Weave - a multi-host Docker network • Multus - a Multi plugin • CNI-Genie - generic CNI network plugin • Silk - a CNI plugin designed for Cloud Foundry • Linen - designed for overlay networks and compatible with OpenFlow protocol through Open vSwitch • More than 10 third-party party plugins !! 13
  • 15. What is Linen CNI? A 3rd party CNI plugins designed for “Overlay Networks” and compatible with “OpenFlow Protocol” through Open vSwitch 15
  • 16. Overlay Network 16 • Underlay network (built using physical devices and links) • Create a new virtual network topology on top of underlay • GRE tunnel, VxLAN tunnel, MPLS and VPN Underlay Network
  • 17. Comparison of 
 multi-host networking 17 Comparison of multi-host overlay networking solutions Calico Flannel Weave Docker 
 Overlay Network Network Model Pure Layer-3 Solution VxLAN or 
 UDP Channel VxLAN or UDP 
 Channel VxLAN Protocol Support TCP, UDP, ICMP & ICMPv6 ALL ALL ALL Reference from Battlefield: Calico, Flannel, Weave and Docker Overlay Network
  • 18. Why Open vSwitch? 18 • Multi-host overlay networking • Provide flexible network management • Boosts packet processing, performance and throughput
  • 19. Multi-host Overlay Networking 19 • All containers can communicate with all other containers • All nodes can communicate with all containers (and vice-versa)
  • 20. Network Management 20 • Support SDN controller to manage flow control to the switches
  • 21. Performance 21 • Open vSwitch with the Data Plane Development Kit (OvS-DPDK) • Intel DPDK accelerated switching and packet processing
  • 22. Linen CNI Overview 22 Linen CNI is • designed to meet the requirements of overlay networks and compatible with OpenFlow protocol • inspired by the document from Kubernetes OVS networking • a chained plugin and it depends on bridge plugin
  • 23. Linen CNI Usage 23 On Host1: $ ip netns add ns1 $ ip netns exec ns1 ip link 1: lo: <LOOPBACK> ... $ CNI_PATH=`pwd` NETCONFPATH=/root ./cnitool add mynet /var/run/netns/ns1 $ ip netns exec ns1 ip link 1: lo: <LOOPBACK> ... 3: eth0@if97: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1400 ...
  • 24. 24
  • 25. Linen CNI Usage 25 On Host2: $ ip netns add ns2 $ ip netns exec ns2 ip link 1: lo: <LOOPBACK> ... $ CNI_PATH=`pwd` NETCONFPATH=/root ./cnitool add mynet /var/run/netns/ns2 $ ip netns exec ns2 ip link 1: lo: <LOOPBACK> ... 3: eth0@if100: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1400 …
  • 26. 26
  • 27. Linen CNI Usage 27 # ON HOST 1 $ ip netns exec ns1 ip address 3: eth0@if97: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1400 ... ... inet 10.244.1.17/16 scope global eth0 ... # ON HOST 2 $ ip netns exec ns2 ping 10.244.1.17 PING 10.244.1.17 (10.244.1.17) 56(84) bytes of data. 64 bytes from 10.244.1.17: icmp_seq=1 ttl=64 time=0.089 ms 64 bytes from 10.244.1.17: icmp_seq=2 ttl=64 time=0.037 ms ping to verify network connectivity
  • 29. Kubernetes & Linen CNI 29 • Management Workflow • Packet Processing
  • 30. Management Workflow 30 • linen-cni: Executed by the container runtime and set up the network stack for containers • flax daemon: DaemonSet. Runs on each host in order to discover new nodes joining and manipulate ovsdb
  • 31. Packet Processing 31 • The docker bridge is replaced with linux bridge (kbr0) • OVS bridge is created (obr0) and added as a port to the kbr0 bridge • All OVS bridges across all nodes are linked with VxLAN tunnels
  • 32. Installation on K8S 32 • The Open vSwitch is required • kubelet setting kubelet ... --network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin
  • 33. Installation on K8S 33 • Create a configuration list file in /etc/cni/net.d and file name must be name with linen.conflist • Make sure linen, bridge and host-local binaries are in /opt/cni/bin • (Optional) Apply a Daemon Set flaxd.yaml to discover new node joining
  • 34. Network configuration reference 34 • ovsBridge: name of the ovs bridge to use/create • vtepIPs: list of the VxLAN tunnel end point IP addresses • controller: sets SDN controller, assigns an IP address, port number { "name":"mynet", "cniVersion": "0.3.1", "plugins":[ { //… bridge configurations }, { "type":"linen", "runtimeConfig":{ "ovs":{ "ovsBridge":"br0", "vtepIPs":[ "172.120.71.50" ], "controller":"192.168.2.100:6653" } } } ] }
  • 37. OVN-Kubernetes Overlay 37 • K8S Switches (1 per node): In node networking • K8S Router: Cross-node networking • Join Switch • External Router: access external network (NAT) • External Switch
  • 38. Network Models 38 Comparison of multi-host overlay networking solutions Calico OVN-Kubernetes Flannel Linen Network 
 Model Layer-3 Solution Layer-3 Solution VxLAN or 
 UDP Channel VxLAN Performance High High Medium Medium Complexity High High Low Low
  • 39. Takeaway 39 More network virtualization projects https://github.com/John-Lin/linen-cni @johnlin__ SDN-DS.TW: https://www.facebook.com/groups/sdnds.tw/ Contact me https://github.com/John-Lin/tinynet 39