install-k8s-on-ubuntu-2204/install-kube-from-repo.sh
Eliezer Croitoru 3cc31c085a 16
2024-01-28 18:27:05 +00:00

18 lines
574 B
Bash
Executable File

#!/usr/bin/env bash
export DEBIAN_FRONTEND=noninteractive
apt install -y apt-transport-https ca-certificates curl gpg
stat /etc/apt/keyrings/kubernetes-apt-keyring.gpg || \
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.29/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.29/deb/ /' | \
tee /etc/apt/sources.list.d/kubernetes.list
apt update
apt-get install -y kubelet kubeadm kubectl
apt-mark hold kubelet kubeadm kubectl