参考 http://blog.csdn.net/acxlm/article/details/79069468
遇到的问题及解决:
1. 直接用aliyun docker 可以用最新的, 我用的docker 17.12
#aliyun
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.back
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
#docker yum
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
sudo yum makecache fast
sudo yum -y install docker-ce
sudo service docker start
2. 关闭swap;
3. 关闭selinux
4. cat <<EOF > /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
EOF
5.
cat << EOF > /etc/docker/daemon.json
{
"exec-opts": ["native.cgroupdriver=systemd"]
}
EOF
6. 链接: https://pan.baidu.com/s/1hukuN6O 密码: 6ehe
The connection to the server localhost:8080 was refused ,解决
export KUBECONFIG=/etc/kubernetes/admin.conf
就是配置没生效
7. 加入node 时 复制的不要有空格回车