I want to modify /etc/network/interfaces ,but it cannot work, why?
Network settings are read from the cloud-config (/var/lib/rancher/conf/cloud-config.d/user_config.yml).
If the setting you want to change isn’t directly supported by one of the parameters documented you can use the pre_up
or post_up
directives. For example, to add a route;
rancher:
network:
interfaces:
eth0:
mtu: 1500
post_up:
- ip route add 10.11.67.0/8 via 10.11.12.254 dev eth0
If you’re still stuck, post back with more detail on what you want to do and I’ll hopefully work out what needs to be done.
1 Like