Home > database >  Installing specific kubernetes version on Centos
Installing specific kubernetes version on Centos

Time:12-15

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 

CodePudding user response:

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.

  • Related