Issue
I am going through the Kubernetes installation docs (https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/) and I am at the point where I am suppose to install the kubelet
, kubeadm
and kubectl
RPMs. I created this yum repo:
[root@stg-003 ~]# cat /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-$basearch
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
exclude=kubelet kubeadm kubectl
Then I execute this yum command:
[root@stg-003 ~]# yum install -y kubelet kubeadm kubectl –disableexcludes=kubernetes
Which gives this output:
Loaded plugins: fastestmirror, langpacks, merge-conf, priorities, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Loading mirror speeds from cached hostfile
13024 packages excluded due to repository priority protections
No package kubelet available.
No package kubeadm available.
No package kubectl available.
Error: Nothing to do
I went here https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64/Packages and there are no packages!
So how do I install kubelet
, kubeadm
and kubectl
RPMs?
Solution
If you check the file repo that's kubernetes.repo you are clearly excluding all the three packages. How will yum find it, if you are to exclude those?
However there's also a failure in the above command. Yum treats unicode characters as part of package names.
Check for the -- double dash that you missed in above command.
yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes
There's an open PR for the same on there website. https://github.com/kubernetes/website/issues/20915
Also the packages are never stored in open, they pick the data from XML files stored in the other folder. Please try and remove the exclude file from repo file.
A wide list of all repos can be found here. It's the same repo that's in the kubernetes docs.
https://packages.cloud.google.com/yum/repos/
Answered By - redzack Answer Checked By - Dawn Plyler (WPSolving Volunteer)