一、关闭CentOS自带的防火墙服务
# systemctl disable firewalld
# systemctl stop firewalld
二、安装etcd和Kubernetes软件(会自动安装Docker)
# yum install -y etcd kubernetes
三、安装好软件后,修改两个配置文件(其他的配置文件使用系统默认的配置参数即可)
› Docker配置文件为 /etc/sysconfig/docker,其中OPTIONS的内容为:
OPTIONS='--selinux-enabled=false --insecure-registry gcr.io'
› Kubernetes apiserver配置文件为/etc/kubernetes/apiserver,把--admission_control参数中的ServiceAccount删除。
四、按顺序启动所有服务
# 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