We are evaluating RancherOS as a host OS for our transition to containers. We’re running on KVM using an ISO install. The server has a single network interface (eth0) on a private LAN. We’re able to ssh into the server from another server on the private network. We now need to install dependencies which require access to the public internet.
For all our other servers, which are using CentOS 7, we have a gateway setup thru a single server which has access to the public internet. We want to do the same for the RancherOS server but I’m having trouble with getting the gateway to operate. This is probably due to unfamiliarity with cloud-config and RancherOS in general. So far I’ve tried the following:
1) ros config set rancher.network.interfaces.eth0.gateway 10.14.194.15
2) ros config set rancher.network.interfaces.eth*.gateway 10.14.194.15
3) route add default gw 10.14.194.15
10.14.194.15 is the internal IP for the gateway, which is also the machine we’re using to SSH into the RancherOS machine. Neither #1 or #2 work, as determined by issuing “ping google.com”. Furthermore, after rebooting, we are no longer able to SSH into the machine. The ping only succeeds with #3, however it doesn’t persist after reboot.
I used the cloud-config to set a static IP when installing my servers, can’t remeber on the top of my head exactly what I wrote. I do know I followed the documentation and it worked. If I do ros config get rancher.network.interfaces.eth0.gateway it gives me the IP of the gateway server so your number 1 should work.
So maybe not something rancher specific but rather general networking, for example: are you sure the rancher server is on the same 10.14… network, is the netmask set correctly, do you have nameservers working et c.