I have created a mynet IPVLAN interface with the expectation that it should create me a new interface for the deployed task. The task gets a port on the IP associated with the physical interface, not a new interface and it is not routable.
There are no errors in the logs so I’m a little confused as to where to go next.
{
"cniVersion": "0.4.0",
"name": "mynet",
"plugins": [
{
"type": "ipvlan",
"master": "ens3",
"ipam": {
"type": "host-local",
"ranges": [
[
{
"subnet": "10.0.3.0/24",
"rangeStart": "10.0.3.10",
"rangeEnd": "10.0.3.15",
"gateway": "10.0.3.1"
}
]
],
"routes": [
{ "dst": "0.0.0.0/0" }
],
"dataDir": "/run/my-orchestrator/container-ipam-state"
}
},
{
"type": "portmap",
"capabilities": {
"portMappings": true
},
"snat": true
}
]
}
Interface:
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc mq state UP group default qlen 1000
link/ether 12:2b:d0:6e:06:57 brd ff:ff:ff:ff:ff:ff
altname enp0s3
inet 10.0.3.13/24 metric 100 brd 10.0.3.255 scope global dynamic ens3
Job specification
datacenters = ["dc1"]
group "cni_test" {
count = 1
restart {
attempts = 1
}
network {
mode = "cni/mynet"
port "http" {
to = 80
}
}
task "cni_test" {
driver = "docker"
config {
image = "nginx"
ports = ["http"]
}
}
}
}
Is there something I am missing to get this to work?