centos7 上的 Kubernetes 安装
Kubernetes installation on centos7
我有一台 centos 7 服务器,我安装了 docker-ce(17.06.0-ce, build 02c1d87)。
当我尝试安装 kubernetes 时,我一直遇到冲突。 docker-1.12.6-32.git88a4867.el7.centos.x86_64依赖在docker-ce安装时已经安装。如果我卸载 docker-ce ,我就可以安装 kubernetes。由于这个冲突,我无法在机器上安装 docker-ce 和 kubernetes。
我卸载了 docker 并重新安装了它,但没有成功。请帮我解决这个问题
---> Package docker-client.x86_64 2:1.12.6-32.git88a4867.el7.centos will be installed
---> Package docker-common.x86_64 2:1.12.6-32.git88a4867.el7.centos will be installed
--> Processing Conflict: docker-ce-17.06.0.ce-1.el7.centos.x86_64 conflicts docker
--> Processing Conflict: docker-ce-17.06.0.ce-1.el7.centos.x86_64 conflicts docker-io
--> Finished Dependency Resolution
Error: docker-ce conflicts with 2:docker-1.12.6-32.git88a4867.el7.centos.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
仅供参考:我已经尝试过 yum remove docker docker-engine docker-selinux container-selinux 并安装了 kubernetes。但是这种方法不允许我在容器中做任何事情。 ubuntu 容器中的 Yum 更新抛出错误。我在 nginx 容器、centos 容器中也出现错误。
EG:当我 运行 命令 apt-get update 时,我不断收到错误消息“E:无法打开锁定文件 /var/lib/dpkg/lock - 打开(13:权限被拒绝)
E: 无法锁定管理目录 (/var/lib/dpkg/),你是 root 吗?
“
我以 root 身份执行命令。
根据 documentation,Kubernetes 还不兼容 docker-ce (docker >=17.x):
On each of your machines, install Docker. Version 1.12 is recommended, but v1.10 and v1.11 are known to work as well. Versions 1.13 and 17.03+ have not yet been tested and verified by the Kubernetes node team.
Docker versions 1.10.3, 1.11.2, 1.12.6 have been validated
从 Kubernetes 1.7 开始,不支持 Docker 17.xx。您需要卸载 Docker CE 并按照您所遵循的 Kubernetes 安装说明为您安装 Docker 1.12。
我有一台 centos 7 服务器,我安装了 docker-ce(17.06.0-ce, build 02c1d87)。 当我尝试安装 kubernetes 时,我一直遇到冲突。 docker-1.12.6-32.git88a4867.el7.centos.x86_64依赖在docker-ce安装时已经安装。如果我卸载 docker-ce ,我就可以安装 kubernetes。由于这个冲突,我无法在机器上安装 docker-ce 和 kubernetes。
我卸载了 docker 并重新安装了它,但没有成功。请帮我解决这个问题
---> Package docker-client.x86_64 2:1.12.6-32.git88a4867.el7.centos will be installed
---> Package docker-common.x86_64 2:1.12.6-32.git88a4867.el7.centos will be installed
--> Processing Conflict: docker-ce-17.06.0.ce-1.el7.centos.x86_64 conflicts docker
--> Processing Conflict: docker-ce-17.06.0.ce-1.el7.centos.x86_64 conflicts docker-io
--> Finished Dependency Resolution
Error: docker-ce conflicts with 2:docker-1.12.6-32.git88a4867.el7.centos.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
仅供参考:我已经尝试过 yum remove docker docker-engine docker-selinux container-selinux 并安装了 kubernetes。但是这种方法不允许我在容器中做任何事情。 ubuntu 容器中的 Yum 更新抛出错误。我在 nginx 容器、centos 容器中也出现错误。
EG:当我 运行 命令 apt-get update 时,我不断收到错误消息“E:无法打开锁定文件 /var/lib/dpkg/lock - 打开(13:权限被拒绝) E: 无法锁定管理目录 (/var/lib/dpkg/),你是 root 吗? “
我以 root 身份执行命令。
根据 documentation,Kubernetes 还不兼容 docker-ce (docker >=17.x):
On each of your machines, install Docker. Version 1.12 is recommended, but v1.10 and v1.11 are known to work as well. Versions 1.13 and 17.03+ have not yet been tested and verified by the Kubernetes node team.
Docker versions 1.10.3, 1.11.2, 1.12.6 have been validated
从 Kubernetes 1.7 开始,不支持 Docker 17.xx。您需要卸载 Docker CE 并按照您所遵循的 Kubernetes 安装说明为您安装 Docker 1.12。