yum install –y curl,iptables-services,net-tools,wget
2. 停用自带防火墙
systemctl stop firewalld systemctl disable firewalld
3. 启动docker
#docker daemon -H unix:///var/run/docker.sock -H tcp://0.0.0.0:2375 >> /data/logs/docker.log 2>&1 &
4. 在master端将node相关组件拷贝到node
#scp kubelet kube-proxy 192.168.56.147:/opt/kubernetes/bin/ #scp kubelet kube-proxy 192.168.56.148:/opt/kubernetes/bin/
5. 启动kubelet
#kubelet --logtostderr=true --v=0 --config=/etc/kubernetes/manifests --address=0.0.0.0 --api-servers=http://kube-master:8080 --pod-infra-container-image=docker.io/kubernetes/pause:latest >> /data/logs/kubelet.log 2>&1 &
选型说明
--hostname_override:在master端显示的节点名称,对应的node主机修改对应的IP
--pod-infra-container-image:创建pod时下载镜像地址,默认是gcr.io/google_containers/pause:0.8.0,需要墙才能访问,所以指定了官方镜像下载源
6. 启动kube-proxy
#kube-proxy --logtostderr=true --v=0 --proxy-mode=iptables --master=http://kube-master:8080 >> /data/logs/kube-proxy.log 2>&1 &
7. 检查健康状态
在master上执行
#kubectl -s http://kube-master:8080 get node
8. 设置开机启动
执行从kubernetes的安装文件中脚本
kubernetes-1.3.5/cluster/centos/node/scripts
![三、node的安装_第1张图片](http1://img.it610.com/image/info5/444b9c84d07640eb8008cac2420f093d.png)
# sh kubelet.sh # sh proxy.sh
生成/usr/lib/systemd/system/kubelet.service和/opt/kubernetes/cfg/kubelet
生成/usr/lib/systemd/system/kube-proxy.service和/opt/kubernetes/cfg/kube-proxy
修改kubelet配置
![三、node的安装_第2张图片](http1://img.it610.com/image/info5/d5782456ce724b389bf7314f9cb40eb8.png)
修改kube-proxy配置
![三、node的安装_第3张图片](http1://img.it610.com/image/info5/c375da408f394c96a858d7534d341537.png)
#systemctl start kubelet #systemctl start kube-proxy
9. 其他node机器快速部署
scp -rp /usr/lib/systemd/system/kube* [email protected]:/usr/lib/systemd/system scp -rp /opt/kubernetes/ [email protected]:/opt/ export PATH=$PATH:/opt/kubernetes/bin/