Kubernetes Installation

Debian

Kubectl

First install Docker with:

sudo apt install docker.io

Then enable it, so docker will autostart on the machine startup:

systemctl enable docker

Add user to the docker user group:

sudo usermod -aG docker $USER

Download kubectl:

curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/<arch>/kubectl"

where <arch> is your architecture, e.g. arm64 or amd64

Then install downloaded kubectl:

sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

Check if installation completed successfully:

kubectl version --client
# or
kubectl version --client --output=yaml

Minikube

Download minikube with:

wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-<arch>64

Like with installation of kubectl <arch> defines your desired architecture, e.g. arm64 or amd64.

Copy downloaded minikube binary to the binaries folder:

sudo cp minikube-linux-<arch>64 /usr/local/bin/minikube

Give permission to execute this binary:

sudo chmod +x /usr/local/bin/minikube

Run minikube:

minikube start

Now you can check cluster status with:

kubectl cluster-info

Kubernetes GUI Dashboard

Run:

kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v<tag>/aio/deploy/recommended.yaml

where <tag> is a required version to install.

Additional

Kubernetes does not work correctly on systems with swap enabled. To disable it:

sudo swapoff -a

References