systemctl disable firewalld
systemctl stop firewalld
yum install -y etcd kubernetes
3.1 Docker配置文件为 /etc/sysconfig/docker,其中OPTIONS的内容为:
OPTIONS='--selinux-enabled=false --insecure-registry gcr.io'
vim /etc/kubernetes/apiserver
4.1 编写启动脚本 vim startk8s.sh
#/bin/bash
systemctl start etcd
systemctl start docker
systemctl start kube-apiserver
systemctl start kube-controller-manager
systemctl start kube-scheduler
systemctl start kubelet
systemctl start kube-proxy
4.2 赋予脚本权限
chmod +x startk8s.sh
4.3 执行脚本
./startk8s.sh