Skip to content

Instantly share code, notes, and snippets.

@sonuame
Last active April 20, 2024 07:57
Show Gist options
  • Save sonuame/395fafe2d5442e4f84521164280cf6fc to your computer and use it in GitHub Desktop.
Save sonuame/395fafe2d5442e4f84521164280cf6fc to your computer and use it in GitHub Desktop.
kubernetes installation for debian
apt-get update
# apt-transport-https may be a dummy package; if so, you can skip that package
apt-get install -y apt-transport-https ca-certificates curl gpg
# If the directory `/etc/apt/keyrings` does not exist, it should be created before the curl command, read the note below.
# sudo mkdir -p -m 755 /etc/apt/keyrings
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.30/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
# This overwrites any existing configuration in /etc/apt/sources.list.d/kubernetes.list
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.30/deb/ /' | tee /etc/apt/sources.list.d/kubernetes.list
apt-get update
apt-get install -y kubelet kubeadm kubectl
apt-mark hold kubelet kubeadm kubectl
systemctl enable --now kubelet
wget https://github.com/Mirantis/cri-dockerd/releases/download/v0.3.13/cri-dockerd_0.3.13.3-0.debian-bullseye_amd64.deb
apt install ./cri-dockerd_0.3.13.3-0.debian-bullseye_amd64.deb
kubeadm init --cri-socket unix:///var/run/cri-dockerd.sock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment