[root@rmaster01 ~]# echo -e “192.168.31.130 kubernetes”|sudo tee -a /etc/hosts
192.168.31.130 kubernetes
[root@rmaster01 ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.31.130 rmaster01
192.168.31.131 rmaster02
192.168.31.132 rmaster03
192.168.31.133 node01
192.168.31.134 node02
192.168.31.133 node01 riyimei.cn
192.168.31.130 kubernetes
[root@rmaster01 ~]#