Skip to content

Commit c06aff7

Browse files
authored
Merge pull request #23 from SovereignCloudStack/feat/warn-wrong-mtu
Feat/warn wrong mtu
2 parents e1c078c + f400f69 commit c06aff7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

01-kind-cluster.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ DEV=$(ip route show default | head -n1 | sed 's/^.*dev \([^ ]*\).*$/\1/')
55
CLOUDMTU=$(ip link show $DEV | head -n1 | sed 's/^.*mtu \([0-9]*\) .*$/\1/')
66
DOCKERMTU=$(ip link show docker0 | head -n1 | sed 's/^.*mtu \([0-9]*\) .*$/\1/')
77
if test $DOCKERMTU -gt $CLOUDMTU; then
8-
echo "WARNING: Consider setting mtu to $((8*($CLOUDMTU/8))) in /etc/docker/daemon.json"
8+
echo "WARNING: Consider setting { \"mtu\": $((8*($CLOUDMTU/8))) } in /etc/docker/daemon.json"
99
echo " and restart docker and do docker network rm kind ..."
10+
echo "If you see ImagePullBackOff and ImagePullErrors, you now know why."
1011
sudo ip link set dev docker0 mtu $((8*($CLOUDMTU/8)))
1112
# Just in case ...
1213
sudo sysctl net.ipv4.tcp_mtu_probing=1

0 commit comments

Comments
 (0)