Prerequisites for Bare-Metal K3s Homelab
Prerequisites
Section titled “Prerequisites”Before provisioning the bare-metal K3s cluster, set up your local operator workstation and verify target node access.
Step 1: Install workstation tooling
Section titled “Step 1: Install workstation tooling”Ensure your local workstation has the necessary automation and Kubernetes management tools installed:
macOS (Homebrew)
Section titled “macOS (Homebrew)”brew install ansible kubectl helm pre-commitLinux (APT)
Section titled “Linux (APT)”sudo apt-get update && sudo apt-get install -y curl git ansible kubectl helm pre-commitDev Container Workstation
Section titled “Dev Container Workstation”Alternatively, run the repo’s containerized workstation environment:
./scripts/dev-container.sh up./scripts/dev-container.sh shellStep 2: Configure SSH access to the host
Section titled “Step 2: Configure SSH access to the host”Ansible manages bare-metal nodes over SSH. Generate an SSH key pair if you do not already have one:
ssh-keygen -t ed25519 -C "homelab-admin"Copy your public key to the target node legion (100.66.139.118 or your LAN IP):
ssh-copy-id sudhanva@100.66.139.118Verify passwordless sudo on the target host by adding the user to sudoers:
sudo usermod -aG sudo sudhanvaecho "sudhanva ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/sudhanvaStep 3: Gather account credentials
Section titled “Step 3: Gather account credentials”Have the following credentials ready for platform integration:
- Tailscale: An OAuth client secret with permissions to manage Tailscale devices and Kubernetes operator resources.
- Cloudflare: An API token with Zone.DNS edit permissions for your managed domain (
sudhanva.me). - GitHub: A personal access token for Git authentication and ArgoCD Image Updater write-back.
Step 4: Next steps
Section titled “Step 4: Next steps”Once your workstation tools and target host SSH access are verified, proceed to:
- Prepare the bare-metal machine in Host Preparation.
- Configure Ansible variables in Ansible Configuration.
- Bootstrap the cluster in K3s Bootstrap.