yum remove -y docker docker-common docker-selinux docker-engine
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install -y docker-ce-17.12.0.ce
systemctl enable docker && systemctl start docker
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOF
setenforce 0
yum install -y kubernetes-cni-0.5.1 kubelet-1.8.0 kubectl-1.8.0 kubeadm-1.8.0
systemctl enable kubelet && systemctl start kubelet
sudo tee /etc/modules-load.d/overlay.conf <<-'EOF'
overlay
EOF
reboot
lsmod | grep overlay
overlay
vi /etc/sysconfig/docker-storage-setup
add
STORAGE_DRIVER="overlay"
vi /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
modify
Environment="KUBELET_CGROUP_ARGS=--cgroup-driver=cgroupfs"
systemctl start docker
systemctl start kubelet