1

Following the official documentation, I have an error when trying to install kubernetes cluster yum package.

I am on Centos 7 using yum. So I run this commands:

cat <<EOF | sudo tee /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
EOF

# Set SELinux in permissive mode (effectively disabling it) 
setenforce 0
sed -i 's/^SELINUX=enforcing$/SELINUX=permissive/' /etc/selinux/config

Indeed when I am trying to run yum install -y kubelet kubeadm kubectl I have this error:

Loading mirror speeds from cached hostfile
No package kubelet available.
No package kubeadm available.
No package kubectl available.
Error: Nothing to do

What if the real problem about the installation ?

1
  • Are you check if the repository was added at CentOS? Jan 12 at 21:33
1

When I navigate to the URL, there do not appear to be any packages in the repo. Consider trying a mirror like: mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64

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.