1 .. Copyright 2018 Intel Corporation.
2 Licensed under the Apache License, Version 2.0 (the "License");
3 you may not use this file except in compliance with the License.
4 You may obtain a copy of the License at
5 http://www.apache.org/licenses/LICENSE-2.0
6 Unless required by applicable law or agreed to in writing, software
7 distributed under the License is distributed on an "AS IS" BASIS,
8 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9 See the License for the specific language governing permissions and
10 limitations under the License.
19 Networking applications are of three types - Management applications,
20 Control plane applications and data plane applications. Management
21 and control plane applications are similar to Enterprise applications,
22 but data plane applications different in following aspects:
24 - Multiple virtual network interfaces
25 - Multiple IP addresses
26 - SRIOV networking support
27 - Programmable virtual switch (for service function chaining, to tap
28 the traffic for visibility etc..)
30 Kubernetes (Simply K8S) is the most popular container orchestrator.
31 K8S is supported by GCE, AZURE and AWS and will be supported by
32 Akraino Edge stack that enable edge clouds.
34 K8S has being enhanced to support VM workload types, this helps
35 cloud providers that need to migrate legacy workloads to microservices
36 architecture. Cloud providers may continue to support VM workload
37 types for security reasons and hence there is need for VIM that
38 support both VMs and containers. Since same K8S instance can
39 orchestrate both VM and container workload types, same compute nodes
40 can be leveraged for both VMs and containers. Telco and CSPs are
41 seeing similar need to deploy networking applications as containers.
43 Since, both VMs and container workloads are used for networking
44 applications, there would be need for
46 - Sharing the networks across VMs and containers.
47 - Sharing the volumes across VMs and containers.
49 **Network Function Virtualization Requirements**
53 - Management plane workloads
54 - Control plane work loads
55 - User plane (data plane workloads)
56 - User plane workloads normally have
57 - Multiple interfaces, Multiple subnets, Multiple virtual networks
58 - NFV workloads typically have its own management network.
59 - Some data plane workloads require SR-IOV NIC support for data
60 interfaces and virtual NIC for other interfaces (for performance
62 - Need for multiple CNIs.
63 - NFV workloads require dynamic creation of virtual networks. Dynamic
64 configuration of subnets.
69 A new plugin addressing the below requirements,
71 - For networking workloads as well typical application workloads
72 - Multi-interface support
73 - Multi-IP address support
74 - Dynamic creation of virtual networks
75 - Co-existing with SRIOV and other CNIs.
76 - Route management across virtual networks and external networks
80 OVN, the Open Virtual Network, is a system to support virtual network
81 abstraction. OVN complements the existing capabilities of OVS to add
82 native support for virtual network abstractions, such as virtual L2
83 and L3 overlays and security groups. Services such as DHCP are also
84 desirable features. Just like OVS, OVN’s design goal is to have a
85 production quality implementation that can operate at significant
88 **K8S-OVN4NFV Plugin development**
90 Some code and ideas are being taken from ovn-kubernetes_ plugin
91 work that was done as part of OVN project. Due to good number of
92 changes, it is a new plugin with its own code base. This plugin
93 assumes that the first interface in a Pod is provided by some other
94 Plugin/CNI like Flannel or even OVN-Kubernetes and this plugin is
95 only responsible to add multiple interfaces based on the Pod
96 annotations. This plugin is currently tested to work with Multus as
97 CNI and Flannel as first interface.
99 Its functionality is divided into to following:
103 - Register itself as watcher to K8S API Server to receive POD events
105 - Creates a distributed router
107 - Creates a logical switch to connect distributed router with
109 - Creates a subnet between distributed router & Gateway.
110 - Assigns first two IP addresses of the subnet to router and
112 - Created router port and gateway port as part of assigning IP
113 address and MAC addresses.
117 - Upon POD bring up event
119 - Checks the annotations specific to OVN.
120 - For each network on which POD is going to be brought up
121 - Validates whether the logical switch is already present. If not,
122 it is considered as error.
123 - If IP address and MAC addresses are not static, it asks OVN to
124 assign IP and MAC address.
125 - Collects all IP addresses/MAC addresses assigned. Puts them as
126 annotations (dynamic information) for that POD.
128 - Upon POD deletion event
130 - Returns the IP address and MAC address back to OVN pool.
134 This is present in every minion node. CNI is expected to be called
135 once for all OVN networks either Kubelet directly or via Multus.
139 - Wait for annotations to be filled up by the watcher. From
140 annotations, it knows set of IP Address, MAC address and Routes
142 - Using network APIs for each element in the set:
144 - Assigns the IP address and MAC address to one end of veth pair.
145 Other end veth pair is assigned to br-int.
146 - Creates routes based on the route list provided in annotations.
148 - If isDefaultRoute is set in annotations, it creates default route
161 | | Program OVN Switch
162 |ovn4nfvk8s Plugin| +------------------+
163 | +--------------------->| |
166 | | +------------------+
170 |On Event |Annotate Pod
173 +----+--------------+ +------------------+ +-----------+
175 | Kube API +--------> Kube Scheduler +---------->| |
176 | | | | +--------+--+
177 | | +--------+---------+ |
178 +-------------------+ | |
181 +--------v-----------+ |
184 | +------------------+
185 +--------------------+
188 Complete Architecture can be found in ovn-kubernetes documentation at github
193 .. _ovn-kubernetes: https://wiki.opnfv.org/display/OV/K8S+OVN+NFV+Plugin
195 **Authors/Contributors**
197 Addepalli, Srinivasa R <srinivasa.r.addepalli@intel.com>
198 Sood, Ritu <ritu.sood@intel.com>