-1

I'm trying to install certain version of kubernetes, using yum package manager (In give example I'm trying to install 1.21.8, however yum does not find given package version)

yum install kubelet-1.21.8-0 kubeadm-1.21.8-0 kubectl-1.21.8-0

I also tried like this:

yum install kubelet-1.21.8 kubeadm-1.21.8 kubectl-1.21.8

Output:

No package available 
  • Your naming is correct, can you see what it outputs? You may need to configure a `yum` source, you can coogle a `k8s` `yum` source – 山河以无恙 Dec 14 '22 at 02:27
  • `yum list --showduplicates kubeadm --disableexcludes=kubernetes` You can determine if the version to be installed exists by using this command – 山河以无恙 Dec 14 '22 at 02:49

1 Answers1

0

If your trying to install a specific version of the package it is enough to define it during the yum install command as below :

yum install -y kubelet-<version> kubectl-<version> kubeadm-<version>

Please check when you are installing kubernetes version 1.21.8-00, kubernetes-cni package should be (>= 0.8.7) version to satisfy dependency requirements.

So, the final command looks like this:

yum install -y kubelet-1.21.8-00 kubectl-1.21.8-00 kubeadm-1.21.8-00 kubernetes-cni-0.8.7

To verify the version the below command

kubelet --version / kubeadm version / kubectl version.

Note : Add kubernetes source in /etc/yum.repos.d/kubernetes.repo file. And also make sure your Kubernetes version is compatible with the Docker containers engine version to avoid compatibility problems.

Veera Nagireddy
  • 1,656
  • 1
  • 3
  • 12