我正在尝试在我的centos 7机器上安装kubernetes。在yum repo下面添加。当我安装包时,它给出版本1.6& 1.5。
无法在我的主服务器中安装kubernetes包。
[root@centos-master yum.repos.d]# yum list|grep kube
kubeadm.x86_64 1.6.2-0 @kubernetes
kubectl.x86_64 1.6.2-0 @kubernetes
kubelet.x86_64 1.6.2-0 @kubernetes
kubernetes-cni.x86_64 0.5.1-0 @kubernetes
cockpit-kubernetes.x86_64 135-4.el7.centos extras
kubernetes.x86_64 1.5.2-0.5.gita552679.el7 extras
kubernetes-client.x86_64 1.5.2-0.5.gita552679.el7 extras
kubernetes-master.x86_64 1.5.2-0.5.gita552679.el7 extras
kubernetes-node.x86_64 1.5.2-0.5.gita552679.el7 extras
kubernetes-unit-test.x86_64 1.5.2-0.5.gita552679.el7 extras
rkt.x86_64 1.25.0-1 kubernetes
这是api服务器的报告。
# yum provides kube-apiserver
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.dallas-tx.riverfrontnetworks.com
* extras: cosmos.illinois.edu
* updates: mirror.solarvps.com
kubernetes-master-1.3.0-0.3.git86dc49a.el7.x86_64 : Kubernetes services for master host
Repo : extras
Matched from:
Filename : /usr/bin/kube-apiserver
kubernetes-master-1.4.0-0.1.git87d9d8d.el7.x86_64 : Kubernetes services for master host
Repo : extras
Matched from:
Filename : /usr/bin/kube-apiserver
kubernetes-master-1.5.2-0.2.gitc55cf2b.el7.x86_64 : Kubernetes services for master host
Repo : extras
Matched from:
Filename : /usr/bin/kube-apiserver
kubernetes-master-1.5.2-0.5.gita552679.el7.x86_64 : Kubernetes services for master host
Repo : extras
Matched from:
Filename : /usr/bin/kube-apiserver
回复补充道。
# cat kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=http://yum.kubernetes.io/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
我该如何安装1.6版本。这是错误信息。
yum install kubernetes
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.dallas-tx.riverfrontnetworks.com
* extras: cosmos.illinois.edu
* updates: mirror.solarvps.com
Resolving Dependencies
--> Running transaction check
---> Package kubernetes.x86_64 0:1.5.2-0.5.gita552679.el7 will be installed
--> Processing Dependency: kubernetes-node = 1.5.2-0.5.gita552679.el7 for package: kubernetes-1.5.2-0.5.gita552679.el7.x86_64
--> Processing Dependency: kubernetes-master = 1.5.2-0.5.gita552679.el7 for package: kubernetes-1.5.2-0.5.gita552679.el7.x86_64
--> Running transaction check
---> Package kubernetes-master.x86_64 0:1.5.2-0.5.gita552679.el7 will be installed
--> Processing Dependency: kubernetes-client = 1.5.2-0.5.gita552679.el7 for package: kubernetes-master-1.5.2-0.5.gita552679.el7.x86_64
---> Package kubernetes-node.x86_64 0:1.5.2-0.5.gita552679.el7 will be installed
--> Running transaction check
---> Package kubernetes-client.x86_64 0:1.5.2-0.5.gita552679.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===============================================================================================================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================================================================================================
Installing:
kubernetes x86_64 1.5.2-0.5.gita552679.el7 extras 36 k
Installing for dependencies:
kubernetes-client x86_64 1.5.2-0.5.gita552679.el7 extras 14 M
kubernetes-master x86_64 1.5.2-0.5.gita552679.el7 extras 25 M
kubernetes-node x86_64 1.5.2-0.5.gita552679.el7 extras 14 M
Transaction Summary
===============================================================================================================================================================================================================
Install 1 Package (+3 Dependent packages)
Total download size: 53 M
Installed size: 302 M
Is this ok [y/d/N]: y
Downloading packages:
(1/4): kubernetes-1.5.2-0.5.gita552679.el7.x86_64.rpm | 36 kB 00:00:00
(2/4): kubernetes-client-1.5.2-0.5.gita552679.el7.x86_64.rpm | 14 MB 00:00:07
(3/4): kubernetes-master-1.5.2-0.5.gita552679.el7.x86_64.rpm | 25 MB 00:00:12
(4/4): kubernetes-node-1.5.2-0.5.gita552679.el7.x86_64.rpm | 14 MB 00:00:06
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 3.8 MB/s | 53 MB 00:00:14
Running transaction check
Running transaction test
Transaction check error:
file /usr/bin/kubectl from install of kubernetes-client-1.5.2-0.5.gita552679.el7.x86_64 conflicts with file from package kubectl-1.6.2-0.x86_64
file /usr/bin/kubelet from install of kubernetes-node-1.5.2-0.5.gita552679.el7.x86_64 conflicts with file from package kubelet-1.6.2-0.x86_64
由于 SR
答案 0 :(得分:0)
你似乎安装了kubelet& kubectl 1.5.2已经。你可以卸载1.5.2并重新安装1.6.x。
Yum通常安装最新版本的软件包,无论哪个软件包提供它。在这种情况下,它已安装了冲突的软件包。
编辑:删除了Centos extras引用,因为它不在上下文中。
答案 1 :(得分:0)
对于kubernetes 1.6.2,我们只需要这些rpms。当我们运行
时kubeadm init
命令。它会自动启动其他过程。
# rpm -qa |grep kube
kubelet-1.6.2-0.x86_64
kubeadm-1.6.2-0.x86_64
kubernetes-cni-0.5.1-0.x86_64
kubectl-1.6.2-0.x86_64
更多信息:
https://kubernetes.io/docs/getting-started-guides/kubeadm/
由于 SR