Added portmap cni plugin

pull/418/head
Amir Mofasser 2018-11-26 09:27:09 +01:00
parent bf2850974e
commit c6a5e03ed3
1 changed files with 17 additions and 8 deletions

View File

@ -79,21 +79,30 @@ POD_CIDR=$(curl -s -H "Metadata-Flavor: Google" \
Create the `bridge` network configuration file: Create the `bridge` network configuration file:
``` ```
cat <<EOF | sudo tee /etc/cni/net.d/10-bridge.conf cat <<EOF | sudo tee /etc/cni/net.d/10-bridge.conflist
{ {
"cniVersion": "0.3.1", "cniVersion": "0.3.1",
"name": "bridge", "name": "bridge",
"type": "bridge", "plugins": [
"bridge": "cnio0", {
"isGateway": true, "type": "bridge",
"ipMasq": true, "bridge": "cnio0",
"ipam": { "isGateway": true,
"ipMasq": true,
"ipam": {
"type": "host-local", "type": "host-local",
"ranges": [ "ranges": [
[{"subnet": "${POD_CIDR}"}] [{"subnet": "${POD_CIDR}"}]
], ],
"routes": [{"dst": "0.0.0.0/0"}] "routes": [{"dst": "0.0.0.0/0"}]
}
},
{
"type": "portmap",
"capabilities": {"portMappings": true},
"snat": true
} }
]
} }
EOF EOF
``` ```