Modify docker0 mtu in k8s cluster?

I want to modify the docker0 interface’s Maximum Transmission Unit (MTU) from the default value of 1500 to 1400. I have succeeded in doing so using the command ifconfig docker0 mtu 1400, however the setting does not persist and reverts after some time.

Please help me figure out how to permanently modify the docker0 interface in my Kubernetes cluster.

You can modify the docker0 interface’s MTU permanently by creating a file /etc/docker/daemon.json and adding the following configuration:

  "mtu": 1400

Save the file and restart the Docker daemon using the command systemctl restart docker. This will ensure that the MTU setting persists even after a system reboot.