Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install Kubernetes (kubectl, kubeadm, kubelet) on debian stretch

I would like to install Kubernetes on my debian machine:

Distributor ID: Debian
Description:    Debian GNU/Linux 9.5 (stretch)
Release:        9.5
Codename:       stretch

Looking into google deb package archive I only find the package for "kubectl", nothing else:

https://packages.cloud.google.com/apt/dists/kubernetes-stretch/main/binary-amd64/Packages

Comparing to ubuntu xenial many packages are missing. Could someone be so kind and give me more information how to deal with this ? Is it possible to install kubeadm and kubelet on debian stretch too ?

https://kubernetes.io/docs/setup/independent/install-kubeadm/#installing-kubeadm-kubelet-and-kubectl

Thank you very much in advance !

like image 295
Literadix Avatar asked Sep 27 '18 08:09

Literadix


2 Answers

Is it possible to install kubeadm and kubelet on debian stretch too ?

Yes it is! Please refer to the helpful guide that you linked at the end of your question: https://kubernetes.io/docs/setup/independent/install-kubeadm/#installing-kubeadm-kubelet-and-kubectl

Here is the relevant part:

apt-get update && apt-get install -y apt-transport-https curl
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF >/etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
apt-get update
apt-get install -y kubelet kubeadm kubectl
apt-mark hold kubelet kubeadm kubectl

Note, that you are using kubernetes-xenial above, not kubernetes-stretch.

Do not forget to install docker first, for how, see the same linked page above.

like image 97
Andrew Savinykh Avatar answered Oct 11 '22 13:10

Andrew Savinykh


As of K8S 1.18.5 I am not aware of any official DEB package from Google unfortunately. I would highly recommend you build your own DEB package on Debian Stretch. I have created 2 examples on how to do so with Debian 10 and Ubuntu 18.04 at https://github.com/runlevel5/kubernetes-packages.

like image 43
Trung Lê Avatar answered Oct 11 '22 13:10

Trung Lê