I am going through the kebernetes install 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
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?

  • They just have the directory listing turned off curl -I https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64/Packages/cf6754a3497c5c05de050f2409eb3b2854467967cf359a8ed9c6e6c32808c7de-kubectl-1.18.0-0.x86_64.rpm returns 200 OK. Maybe a yum clean expire-cache will help? – mdaniel May 19 '20 at 20:51
  • @mdaniel Thanks for the suggestion but I still get the same result :( – Red Cricket May 19 '20 at 20:54

You got bitten by an unfortunate mixture of copy-pasta and the fact that yum evidently treats unicode characters as part of package names:

print(repr("[root@stg-003 ~]# yum install -y kubelet kubeadm kubectl –disableexcludes=kubernetes".encode("utf-8")))
>>> b'[root@stg-003 ~]# yum install -y kubelet kubeadm kubectl \xe2\x80\x93disableexcludes=kubernetes'

Switching it to the double-dash syntax installs as expected (at least on centos:7):

yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes

update: I went to open a PR for their website but it appears the work is already underway: https://github.com/kubernetes/website/issues/20915

  • awesome! that was it. thanks – Red Cricket May 20 '20 at 4:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.