mmumshad / kubernetes-the-hard-way

Bootstrap Kubernetes the hard way on Vagrant on Local Machine. No scripts.
Apache License 2.0
4.7k stars 4.54k forks source link

Changed the cluster ip to 192.168.56.* #285

Closed kaustubhmali02 closed 2 years ago

kaustubhmali02 commented 2 years ago

If any one had problems with installing kubernetes in a hard way. Specially with the Provisioning infrastructure using Vagrant. The problem I faced was with the virtual box setup as it uses IPs from 192.168.50.0/24 CIDR Block. So it was not able to assign IPs from 192.168.5.0/24 Made some changes to the IPs for master-1, master-2, worker-1, worker-2 and load-balancer. Made some changes in the Vagrant file and other places in the repo

vancanhuit commented 2 years ago

@kaustubhmali02 You can specify other IP ranges by creating or modifying this file /etc/vbox/networks.conf with the following content:

* 192.168.56.0/21 192.168.0.0/16

See https://www.virtualbox.org/manual/ch06.html#network_hostonly for more details.

Then running vagrant up command should not have any issue.

kaustubhmali02 commented 2 years ago

@kaustubhmali02 You can specify other IP ranges by creating or modifying this file /etc/vbox/networks.conf with the following content:

* 192.168.56.0/21 192.168.0.0/16

See https://www.virtualbox.org/manual/ch06.html#network_hostonly for more details.

Then running vagrant up command should not have any issue.

True. So as per the documentation, HostOnlyNetwork in virtual machine can be changed to other CIDR Blocks but is defaulted to use 192.168.56.0/21 for mac and linux: image image