-2

I want to install kubernetes v1.15 on ubuntu 18.04 but every time i run the following command :

apt-get update && apt-get install -y apt-transport-https curl

curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add

sudo apt-add-repository "deb http://apt.kubernetes.io/ kubernetes-xenial main"

sudo apt-get install -qy kubelet=1.13.0-00 kubectl=1.13.0-00 kubeadm=1.13.0-00

It downloaded only the current version ....can anyone help ?

acid_fuji
  • 6,287
  • 7
  • 22
  • 2
    Does this answer your question? [How to install specific version of Kubernetes?](https://stackoverflow.com/questions/49721708/how-to-install-specific-version-of-kubernetes) – DT. Jan 06 '20 at 11:29

1 Answers1

1

I successfully installed version 1.15 using those commands:

Get the Kubernetes gpg key:

curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -

Add the Kubernetes repository:

cat << EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list
deb https://apt.kubernetes.io/ kubernetes-xenial main
EOF

Update your packages:

sudo apt-get update

And then install kubelet, kubeadm, and kubectl:

sudo apt-get install -y  kubelet=1.15.0-00 kubeadm=1.15.0-00 kubectl=1.15.0-00

You will also want to hold them to prevent unwanted updates:

sudo apt-mark hold docker-ce kubelet kubeadm kubectl

Can you try using those commands and let me know if its works?

acid_fuji
  • 6,287
  • 7
  • 22
  • While run the command : sudo apt-get install -y kubelet=1.15.0-00 kubeadm=1.15.0-00 kubectl=1.15.0-0 getting the following error : Reading package lists... Done Building dependency tree Reading state information... Done E: Version '1.15.0-0' for 'kubectl' was not found –  Jan 06 '20 at 10:38
  • There was one 0 missing from the command. It should be kubectl=1.15.0-00 instead of kubectl=1.15.0-0. I have corrected the answer as well. Can try now? – acid_fuji Jan 06 '20 at 11:16