Skip to content

A example repository about how to write your own CNI (Container Network Interface) plugin.

License

Notifications You must be signed in to change notification settings

hwchiu/CNI_Tutorial_2018

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

Read the following article to learn what is CNI

[CNI] Bridge Network In Docker

[CNI] Container Network Interface Introduction

[CNI] Write A CNI Plugin By Golang

CNI_Tutorial_2018

A example repository about how to write your own CNI (Container Network Interface) plugin.

How to test it

To build the CNI binary

$ vagrant up
$ vagrant ssh
$ cd $GOPATH/src/github.com/hwchiu/CNI_Tutorial_2018
$ go build .

Setup a netns and use the CNI to handle the IP address

$ ip netns add ns1

Execute a CNI:

$ sh test.sh
$ brctl show
$ ip netns exec ns1 ifconfig -a

Delete a netns:

$ ip netns del ns1

Delete a bridge:

$ ifconfig test down
$ brctl delbr test

About

A example repository about how to write your own CNI (Container Network Interface) plugin.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published