Recently set up a kubernetes cluster environment encountered a problem, CentOS7 after the restart of the IP changes caused the cluster ETCD service can not be started after the cluster environment becomes unavailable, in this case, the CentOS7 must be fixed IP and access to the extranet (download image).
first turn off VMware's DHCP:
Choose Edit-"Virtual network editor"
Select VMnet8 to remove the option to assign the IP address to the virtual machine (D) using the local DHCP service. Click Nat Settings (S) To view the gateway address:
After setting up, click OK to do it.
To set up a CentOS static IP:
Configuration files that involve modifications are:
/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-ens33
/etc/resolv.conf
Modify the /etc/sysconfig/network as follows :
Modify the /etc/sysconfig/network-scripts/ifcfg-ens33 as follows:
Modify the /etc/resolv.conf file as follows:
Restart the network after the modification is complete:
Service Network restart
Then verify to see if you can access the extranet:
So setup is complete, reboot, kubernetes cluster environment recovery.
CentOS7 set fixed IP in VMware and access to extranet