Skip to main content

SETUP

Install packages for master

Install docker:

sudo apt install -y docker.io

Debian, Ubuntu, and operating systems using apt/apt-get
Replace the apt repository definition so that apt points to the new repository instead of the Google-hosted repository. Make sure to replace the Kubernetes minor version in the command below with the minor version that you're currently using:

echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.28/deb/ /" | sudo tee /etc/apt/sources.list.d/kubernetes.list

Download the public signing key for the Kubernetes package repositories. The same signing key is used for all repositories, so you can disregard the version in the URL:

curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.28/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg

Update: In releases older than Debian 12 and Ubuntu 22.04, the folder /etc/apt/keyrings does not exist by default, and it should be created before the curl command.

Update the apt package index:

sudo apt-get update

Install Kubernetes components:

sudo apt-get install -y kubelet kubeadm kubectl

Install packages for worker node/s

https://kubernetes.io/blog/2023/08/15/pkgs-k8s-io-introduction/ 

Install docker:

sudo apt install -y docker.io

Debian, Ubuntu, and operating systems using apt/apt-get
Replace the apt repository definition so that apt points to the new repository instead of the Google-hosted repository. Make sure to replace the Kubernetes minor version in the command below with the minor version that you're currently using:

echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.28/deb/ /" | sudo tee /etc/apt/sources.list.d/kubernetes.list

Download the public signing key for the Kubernetes package repositories. The same signing key is used for all repositories, so you can disregard the version in the URL:

curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.28/deb/Release.key | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg

Update: In releases older than Debian 12 and Ubuntu 22.04, the folder /etc/apt/keyrings does not exist by default, and it should be created before the curl command.

Update the apt package index:

sudo apt-get update

Install Kubernetes components:

sudo apt-get install -y kubelet kube-proxy

Optionally, you can also install kubectl on worker nodes if you want to use it for debugging:

sudo apt-get install -ykubeadm kubectl