Reputation: 1407
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 !
Upvotes: 6
Views: 9678
Reputation: 818
try with this step
sudo apt install curl apt-transport-https -y
curl -fsSL https://packages.cloud.google.com/apt/doc/apt-key.gpg|sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/k8s.gpg
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo apt update
sudo apt install wget curl vim git kubelet kubeadm kubectl -y
sudo apt-mark hold kubelet kubeadm kubectl
and finally, Confirm installation by checking the version of kubectl.
kubectl version --client && kubeadm version
after checking the logs must be something like this.
Client Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.3", GitCommit:"aef86a93758dc3cb2c658dd9657ab4ad4afc21cb", GitTreeState:"clean", BuildDate:"2022-07-13T14:30:46Z", GoVersion:"go1.18.3", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.4
kubeadm version: &version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.3", GitCommit:"aef86a93758dc3cb2c658dd9657ab4ad4afc21cb", GitTreeState:"clean", BuildDate:"2022-07-13T14:29:09Z", GoVersion:"go1.18.3", Compiler:"gc", Platform:"linux/amd64"}
Upvotes: 1
Reputation: 5236
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.
Upvotes: 1
Reputation: 26329
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.
Upvotes: 1