This plugins allows to confiure container networking with VXLAN and advertise container's network as VXLAN + IP + Mac object using EVPN BGP route. You must have bagpipe-bgp installed on the host machine:
Probably have a route reflector (BGP router that supports AFI=25 SAFI=70) because bagpipe-bgp allows only to run two nodes without RR.
Nice example of go-based RR: GoBGP and EVPN lab example can be found here EVPN with BaGPipe BGP and GoBGP RR
Use go get:
go get github.com/murat1985/bagpipe-cni
package would be installed into your $GOBIN path, e.g.:
/usr/local/go/bin
Bare in mind if you are going to use it with Kubernetes plugin should reside in /opt/cni/bin
The second way to install plugin altogether with other CNI plugins and IPAM plugins. Clone CNI repositority: CNI
Make sure that GOPATH environment variable is set
cd $GOPATH
git clone https://github.com/containernetworking/cni
cd cni/plugins/main
Clone bagpipe CNI plugin into plugins/main/bagpipe
git clone https://github.com/murat1985/bagpipe-bgp bagpipe
cd ../../
Build plugins
./build
Supported IP manager plugins:
Just put the example below in file /etc/cni/net.d/10-mynet.conf
{
"name": "mynet",
"type": "bagpipe",
"importrt": "64512:90",
"exportrt": "64512:90",
"isGateway": false,
"ipMasq": false,
"mtu": "1500",
"ipam": {
"type": "host-local",
"subnet": "10.1.2.0/24",
"routes": [
{ "dst": "0.0.0.0/0" }
]
}
}
name
(string, required): the name of the network.type
(string, required): "bagpipe".importrt
(string, required): import communityexportrt
(string, required): export communitymtu
(integer, optional): explicitly set MTU to the specified value. Defaults to the value chosen by the kernel.
I have published a blog post, where described PoC: BaGPipe CNI and Kubernetes
Assuming that cni installed in the $GOPATH/cni and bagpipe CNI plugin is installed in plugins/main/bagpipe docker-run.sh script could be found in scripts directory of CNI repository
cd $GOPATH/cni
CNI_PATH=`pwd`/bin
./build; cd scripts; CNI_PATH=$CNI_PATH ./docker-run.sh busybox ifconfig eth0 ; cd ..
Adding and Deleting of bagpipe tunnels along with container links fully implemented.
- GW allocation (relying on BaGPipe BGP as it is responsible to create a bridge and vxlan interfaces)