No description
  • HCL 92%
  • Python 7%
  • Shell 1%
Find a file
2026-11-07 22:10:19 -05:00
tofu Added postgres and nextcloud backup targets/recurring jobs 2026-11-07 22:10:19 -05:00
.gitignore Added Collabora 2026-09-05 10:18:22 -04:00
.gitmodules Added Redis, FoundryVTT, and OpenTogetherTube 2026-03-17 08:50:40 -04:00
README.md Removing old, unused pure k8s infra. Fully on OpenTofu IaC 2026-08-14 22:13:26 -04:00
renovate.json Update headscale/headscale Docker tag to v0.29.7 2026-11-06 09:17:56 -05:00

Prerequisites

K3s-specific setup

Install k3s with:

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

or connect to a cluster with:

curl -sfL https://get.k3s.io | K3S_URL=https://myserver:6443 K3S_TOKEN=mynodetoken sh -

You can get the token from the cluster host's /var/lib/rancher/k3s/server/node-token file.

Either way, k3s should be running now if everything went well. You can always check its status, enable/disable, start/stop etc with systemctl if you're on Debian or another supporting system.

Copying the config file

K3s creates a config file which is root-only by default. To run k3s, kubectl, and other related commands as non-root, you need to copy this file to somewhere accessible by your user, update its ownership, and set the KUBECONFIG environment variable for persistence.

mkdir -p ~/.kube
sudo cp /etc/rancher/k3s/k3s.yaml ~/.kube/config
sudo chown $(whoami) ~/.kube/config
sudo chgrp $(whoami) ~/.kube/config
echo -e "\nexport KUBECONFIG=~/.kube/config" >> ~/.bashrc
source ~/.bashrc