Steps to set up K3s on Ubuntu
More Information
-
Install k3s as a service
curl -sfL https://get.k3s.io | sh - -
Fix k3s permission denied issues
mkdir ~/.kube 2> /dev/null export KUBECONFIG=~/.kube/config sudo k3s kubectl config view --raw > "$KUBECONFIG" chmod 600 "$KUBECONFIG"- More details in fixing k3s permission denied issues.
-
export
KUBECONFIG=~/.kube/configto either~/.profileor~/.bashrcto make it persist on reboot(Optional).nano ~/.bashrc source ~/.bashrcNavigate to the last line
~/.bashrc# last line export KUBECONFIG=~/.kube/config -
Test connection
kubectl get all
Last updated on
