k3s

Installation

To install k3s run:

curl -sfL https://get.k3s.io | sh

Alternatively, to have the permissions fixed, run:

curl -sfL https://get.k3s.io | sh -s - --write-kubeconfig-mode 644

Context

Set up your an environmental variable for KUBECONFIG=~/.kube/config.

export KUBECONFIG=~/.kube/config

Generate the config at the expected location:

mkdir ~/.kube 2> /dev/null
sudo k3s kubectl config view --raw > "$KUBECONFIG"
chmod 600 "$KUBECONFIG"

Optionally, add KUBECONFIG=~/.kube/config to ~/.profile or ~/.bashrc .