1、配置yum源,博主使用华为的镜像源
选择不同的系统版本下载使用:
2、安装etcd,kubernetes
yum -y install etcd kubernetes
3、修改kubernetes的配置
vim /etc/kubernetes/apiserver
4、安装rhsm,否则启动pod的时候镜像无法下载
1) yum -y install *rhsh*
2) wget http://mirror.centos.org/centos/7/os/x86_64/Packages/python-rhsm-certificates-1.19.10-1.el7_4.x86_64.rpm
3) rpm2cpio python-rhsm-certificates-1.19.10-1.el7_4.x86_64.rpm | cpio -iv --to-stdout ./etc/rhsm/ca/redhat-uep.pem | tee /etc/rhsm/ca/redhat-uep.pem
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
并且执行以下代码:docker pull registry.access.redhat.com/rhel7/pod-infrastructure:latest (博主翻阅遇坑,自己在网上找的答案)
6、验证启动一个deploment