kubernetes集群搭建(1):环境准备

了解kubernets

本次搭建采用的是1个master节点,2个node节点,一个私有docker仓库

1.设置各节点ip信息

 

2.设置hostname(其它节点也需修改)

vi /etc/sysconfig/network
HOSTNAME=master

3.设置hosts信息

[root@k8s-master ~]# vi /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.100.3 k8s-master
192.168.100.5 k8s-node1
192.168.100.4 k8s-node2
192.168.100.6 k8s-docker

4.关闭防火墙

systemctl stop firewalld
systemctl disable firewalld
systemctl status firewalld

5.重启电脑或网络后确认各节点能相互ping通

reboot
或者
service network restart

5.所有节点安装docker并设置为开机启动

yum -y install docker
systemctl start docker
systemctl enable docker

 

posted @ 2018-04-23 09:43  肖哥哥  阅读(726)  评论(0编辑  收藏  举报
生命不息  奋斗不止  每天进步一点点