I have created 2 ubuntu VMs for setting up kubernetes master and one worker node. The IP Addresses of the VMs keep on changing on each bootup.I have assigned static ip using netplan configuration file. After that the IP address is stable but there is no connectivity between the VMs. ssh and ping fails. I have created VMs with bridge network adapter.Please find the netplan configurations below,
VM1:
network: version: 2 ethernets: eth0: dhcp4: no addresses: - 192.168.0.106/24 gateway4: 192.168.0.1 nameservers: addresses: - 8.8.8.8 - 4.4.4.4
VM2:
network: version: 2 ethernets: eth0: dhcp4: no addresses: - 192.168.0.107/24 gateway4: 192.168.0.1 nameservers: addresses: - 8.8.8.8 - 4.4.4.4
Please give a solution for this and point out if anything wrong with the configurations.Note: Once I done changes to netplan configuration ,I applied changes with sudo netplan apply command.