系统版本信息
cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
iso 文件下载地址
https://vault.centos.org/7.6.1810/isos/x86_64/CentOS-7-x86_64-DVD-1810.iso
0.4 版本的kubelet 报错信息记录
E0603 19:00:38.273720 44142 kubelet.go:734]
Error syncing pod: API error (400):
{"message":
"starting container with non-empty request body was deprecated since API v1.22 and removed in v1.24"}
skipping.
配置阿里系统源
cat > /etc/yum.repos.d/CentOS-Base.repo << EOF
[base]
name=CentOS-7.6.1810 - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/7.6.1810/os/x86_64/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-7.6.1810 - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/7.6.1810/updates/x86_64/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-7.6.1810 - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/7.6.1810/extras/x86_64/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-7.6.1810 - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/7.6.1810/centosplus/x86_64/
gpgcheck=1
enabled=1
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-7
EOF
配置阿里docker 源
cat > /etc/yum.repos.d/docker.repo << EOF
[docker]
name=docker
baseurl=https://mirrors.aliyun.com/docker-engine/yum/repo/main/centos/7
gpgcheck=0
EOF
移除已有docker
yum remove docker*
安装支持API v1.23 的docker
yum -y install docker-engine-selinux-1.11.0-1.el7.centos docker-engine-1.11.0-1.el7.centos
systemctl enable --now docker
确认api 版本
docker version --format '{{.Server.APIVersion}}'
1.23