Centos7 单节点安装Kubernetes

1.单节点环境:Centos7.3 虚拟机
2.关闭Centos自带的防火墙服务
systemctl disable firewalld
systemctl stop firewalld
3.安装etcd和Kubernetes
yum install -y etcd kubernetes
该安装会默认自动安装docker
4.安装好软件之后修改两个配置文件,其他文件使用默认配置即可
vim /etc/sysconfig/docker
将OPTIONS内容设置为:
OPTIONS='--selinux-enabled=false --insecure-registry gcr.io --registry gcr.io

vim /etc/kubernetes/apiserver
将KUBE_ADMISSION_CONTROL选项中的ServiceAccount删除掉

5.按顺序启动所有相关服务
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
可以通过ps -ef | grep kub来查看服务是否起来

你可能感兴趣的:(Docker)