|
| 1 | +# CNI-Genie |
| 2 | + |
| 3 | +CNI-Genie enables container orchestrators ([Kubernetes](https://github.com/kubernetes/kubernetes), [Mesos](https://mesosphere.com/)) to seamlessly connect to the choice of CNI plugins installed on a host, including |
| 4 | +1. ['reference' CNI plugins](https://github.com/containernetworking/plugins), e.g., bridge, macvlan, ipvlan, loopback |
| 5 | +2. '3rd-party' CNI plugins, e.g., ([Calico](https://github.com/projectcalico/calico), [Romana](https://github.com/romana/romana), [Weave-net](https://github.com/weaveworks/weave)) |
| 6 | +3. 'specialized' CNI plugins, e.g., [SR-IOV](https://github.com/hustcat/sriov-cni), DPDK (work-in-progress) |
| 7 | +4. any generic CNI plugin of choice installed on the host |
| 8 | + |
| 9 | +Without CNI-Genie, the orchestrator is bound to only a single CNI plugin. E.g., for the case of Kubernetes, without CNI-Genie, kubelet is bound to only a single CNI plugin passed to kubelet on start. CNI-Genie allows for the co-existance of multiple CNI plugins in runtime. |
| 10 | + |
| 11 | +[](https://travis-ci.org/Huawei-PaaS/CNI-Genie) |
| 12 | +[](https://goreportcard.com/report/github.com/Huawei-PaaS/CNI-Genie) |
| 13 | + |
| 14 | +Please feel free to post your feedback, questions on CNI-Genie [Slack channel](https://cni-genie.slack.com/) |
| 15 | + |
| 16 | +## Demo |
| 17 | +Here is a 6 minute demo video that demonstrates 3 scenarios |
| 18 | +1. Assign an IP address to a pod from a particular network solution, e.g., 'Weave-net' |
| 19 | +2. Assign multi-IP addresses to a pod from multiple network solutions, e.g., 1st IP address from 'Weave-net', 2nd IP address from 'Canal' |
| 20 | +3. Assign an IP address to a pod from the "less congested" network solution, e.g., from 'Canal' that is less congested |
| 21 | + |
| 22 | +[](https://asciinema.org/a/118191) |
| 23 | + |
| 24 | +# Contributing |
| 25 | +[Contributing](../../CONTRIBUTING.md) |
| 26 | + |
| 27 | +[Code of Conduct](../../CODE_OF_CONDUCT.md) |
| 28 | + |
| 29 | +# Why we created CNI-Genie? |
| 30 | + |
| 31 | +CNI Genie is an add-on to [Kuberenets](https://github.com/kubernetes/kubernetes) open-source project and is designed to provide the following features: |
| 32 | + |
| 33 | +1. [wide range of network offerings, CNI plugins](../../docs/multiple-cni-plugins/README.md), available to the users in runtime. This figure shows Kubernetes CNI Plugin landscape before and after CNI-Genie |
| 34 | +  |
| 35 | + - User-story: based on "performance" requirements, "application" requirements, “workload placement” requirements, the user could be interested to use different CNI plugins for different application groups |
| 36 | + - Different CNI plugins are different in terms of need for port-mapping, NAT, tunneling, interrupting host ports/interfaces |
| 37 | + |
| 38 | +[Watch multiple CNI plugins demo](https://github.com/Huawei-PaaS/CNI-Genie/blob/master/docs/multiple-cni-plugins/README.md#demo) |
| 39 | + |
| 40 | + |
| 41 | +2. [Multiple NICs per container & per pod](../../docs/multiple-ips/README.md). The user can select multiple NICs to be added to a container upon creating them. Each NIC can get an IP address from an existing CNI plugin of choice. This makes the container reachable across multiple networks. Some use-cases from [SIG-Network](https://github.com/kubernetes/community/wiki/SIG-Network) are depicted in the figure below |
| 42 | +  |
| 43 | + |
| 44 | +[Watch multi-NICs per 'container' demo](https://github.com/Huawei-PaaS/CNI-Genie/blob/master/docs/multiple-ips/README.md#demo) |
| 45 | + |
| 46 | +[Watch multi-NICs per 'pod' demo](https://github.com/Huawei-PaaS/CNI-Genie/blob/master/docs/multiple-ips/README.md#feature-2-extension-cni-genie-multiple-ip-addresses-per-pod) (IP addresses assigned not only to the container, but also to the Pod) |
| 47 | + |
| 48 | +3. [Network Attachment Definition](../../docs/network-attachment-definitions/README.md). CNI-Genie supports [NPWG Multi-Network Specification v1](https://github.com/K8sNetworkPlumbingWG/multi-net-spec) style network attachment to pods, where pods can be assigned IP according to network-attachment-definition CRD objects created by user. |
| 49 | + |
| 50 | +4. The user can leave the CNI plugin selection to CNI-Genie. CNI-Genie watches the Key Performance Indicator (KPI) that is of interest to the user and [selects the CNI plugin](../../docs/smart-cni-genie/README.md), accordingly. |
| 51 | + - CNI Genie watches KPI(s) of interest for existing CNI plugins, e.g., occupancy rate, number of subnets, latency, bandwidth |
| 52 | + |
| 53 | +[Watch Smart CNI Plugin Selection demo](https://github.com/Huawei-PaaS/CNI-Genie/blob/master/docs/smart-cni-genie/README.md#demo) |
| 54 | + |
| 55 | + |
| 56 | +5. [Default plugin support](../../docs/default-plugin/README.md). Another useful feature from genie. Using this, we can ensure to get ip address(es) for a pod by selecting default set of plugins |
| 57 | + |
| 58 | + |
| 59 | +6. Network isolation, i.e., |
| 60 | + - Dedicated 'physical' network for a tenant |
| 61 | + - Isolated 'logical' networks for different tenants on a shared 'physical'network |
| 62 | + |
| 63 | + Usecase : [Obtaining Pod Ip address from customized subnet](../../docs/network-isolation/README.md) |
| 64 | + |
| 65 | +7. [CNI-Genie network policy engine](../../docs/network-policy/README.md) for network level ACLs |
| 66 | + |
| 67 | +8. Real-time switching between different (physical or logical) networks for a given workload. This allows for |
| 68 | + - Price minimization: dynamically switching workload to a cheaper network as network prices change |
| 69 | + - Maximizing network utilization: dynamically switching workload to the less congested network at a threshold |
| 70 | + |
| 71 | +  |
| 72 | + |
| 73 | +Note: CNI-Genie itself is NOT a routing solution! It makes a call to CNI plugins that provide routing service |
| 74 | + |
| 75 | +### More docs here [Getting started](GettingStarted.md), [CNI-Genie Feature Set](CNIGenieFeatureSet.md) |
| 76 | + |
0 commit comments