Hi all,
I’m running the Docker Runner for Drone in Kubernetes, but I can’t seem to get the MTU changed for the dind container.
I need to change the MTU from 1500 to 1450, so I added the following environment variable as per this comment:
DRONE_RUNNER_NETWORK_OPTS: com.docker.network.drive.mtu:1450
But the value does not change:
$ kubectl exec -ti drone-runner-docker-84d697b57d-rhjr6 -c dind -- docker --host tcp://localhost:2375 network inspect bridge | grep mtu
"com.docker.network.driver.mtu": "1500"
I also tried adding “–mtu=1450” to the dind container args, but this does not seem to have effect on the actual network device:
$ kubectl exec -ti drone-runner-docker-6ccb49dd7d-cvdlw -c dind -- docker --host tcp://localhost:2375 network inspect bridge | grep mtu
"com.docker.network.driver.mtu": "1450"
$ kubectl exec -ti drone-runner-docker-6ccb49dd7d-cvdlw -c dind -- ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0@if517: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1450 qdisc noqueue state UP
link/ether e6:8d:fd:f5:76:05 brd ff:ff:ff:ff:ff:ff
3: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
link/ether 02:42:e6:89:31:e5 brd ff:ff:ff:ff:ff:ff
4: br-e71942ad9af0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
link/ether 02:42:b8:32:e6:63 brd ff:ff:ff:ff:ff:ff
8: veth411b34e@if7: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue master br-e71942ad9af0 state UP
link/ether 32:31:d7:29:ba:77 brd ff:ff:ff:ff:ff:ff
How can I apply the MTU correctly?