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
[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?
You got bitten by an unfortunate mixture of copy-pasta and the fact that
yum
evidently treats unicode characters as part of package names:Switching it to the double-dash syntax installs as expected (at least on
centos:7
):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