contrib: cni: provide example CNI configurations
This also updates the readme to no longer contain CNI configuration information (which had incorrect steps), and rather just points to the example configs. Signed-off-by: Aleksa Sarai <asarai@suse.de>
This commit is contained in:
parent
792f585c44
commit
9088a12c75
4 changed files with 39 additions and 35 deletions
39
README.md
39
README.md
|
@ -91,41 +91,10 @@ Follow this [tutorial](tutorial.md) to get started with CRI-O.
|
|||
|
||||
### Setup CNI networking
|
||||
|
||||
Follow the steps below in order to setup networking in your pods using the CNI
|
||||
bridge plugin. Nothing else is required after this since `CRI-O` automatically
|
||||
setup networking if it finds any CNI plugin.
|
||||
|
||||
```sh
|
||||
$ go get -d github.com/containernetworking/cni
|
||||
$ cd $GOPATH/src/github.com/containernetworking/cni
|
||||
$ sudo mkdir -p /etc/cni/net.d
|
||||
$ sudo sh -c 'cat >/etc/cni/net.d/10-mynet.conf <<-EOF
|
||||
{
|
||||
"cniVersion": "0.2.0",
|
||||
"name": "mynet",
|
||||
"type": "bridge",
|
||||
"bridge": "cni0",
|
||||
"isGateway": true,
|
||||
"ipMasq": true,
|
||||
"ipam": {
|
||||
"type": "host-local",
|
||||
"subnet": "10.88.0.0/16",
|
||||
"routes": [
|
||||
{ "dst": "0.0.0.0/0" }
|
||||
]
|
||||
}
|
||||
}
|
||||
EOF'
|
||||
$ sudo sh -c 'cat >/etc/cni/net.d/99-loopback.conf <<-EOF
|
||||
{
|
||||
"cniVersion": "0.2.0",
|
||||
"type": "loopback"
|
||||
}
|
||||
EOF'
|
||||
$ ./build
|
||||
$ sudo mkdir -p /opt/cni/bin
|
||||
$ sudo cp bin/* /opt/cni/bin/
|
||||
```
|
||||
A proper description of setting up CNI networking is given in the
|
||||
[`contrib/cni` README](contrib/cni/README.md). But the gist is that you need to
|
||||
have some basic network configurations enabled and CNI plugins installed on
|
||||
your system.
|
||||
|
||||
### Running with kubernetes
|
||||
You can run the local version of kubernetes using `local-up-cluster.sh`. After starting `ocid` daemon:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue