I want to install kubernet 1.15 on ubuntu 18.04

1/6/2020

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 ?

-- Niladri Dey
kubernetes

1 Answer

1/6/2020

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
Source: StackOverflow