explaingit

alexellis/k3sup

7,383GoAudience · ops devopsComplexity · 3/5Setup · moderate

TLDR

A single-binary Go tool that installs a lightweight Kubernetes cluster on any Linux server in under a minute via SSH from your laptop, then downloads the config so you can control it with kubectl immediately.

Mindmap

mindmap
  root((k3sup))
    What it does
      Installs k3s via SSH
      Adds worker nodes
      Downloads kubeconfig
    Platforms
      Raspberry Pi
      AWS instances
      DigitalOcean
      Bare metal
    Commands
      install
      join
      local install
    Pro features
      Plan and apply
      Multi-node parallel
      Bulk commands
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Install a k3s Kubernetes cluster on a remote VPS or Raspberry Pi with one command from your laptop

USE CASE 2

Add worker nodes to an existing k3s cluster without manually SSH-ing into each machine

USE CASE 3

Bootstrap Kubernetes on cloud VMs from AWS, DigitalOcean, or Civo and start using kubectl in under a minute

Tech stack

Gok3sKubernetesSSH

Getting it running

Difficulty · moderate Time to first run · 5min

Target server must be a Linux machine reachable over SSH, kubectl must be installed locally to use the cluster.

In plain English

k3sup (pronounced "ketchup") is a small command-line tool written in Go that automates the process of setting up a Kubernetes cluster on remote servers using SSH. Kubernetes is software for running and managing many programs across a group of computers, and k3s is a lightweight version of it made by Rancher that runs well on modest hardware including Raspberry Pi devices. Getting k3s onto a fresh server the manual way involves several steps, k3sup collapses the whole thing to one command that takes under a minute. The basic flow is: you run k3sup install from your own laptop, it connects to the remote server over SSH, installs k3s there, and then downloads the configuration file your laptop needs to control that cluster. From that point you can use the standard Kubernetes command-line tool (kubectl) directly from your machine without ever needing to log into the server again. If you want to add more machines to the cluster as worker nodes, the k3sup join command handles that the same way, SSH-ing into each new machine and registering it with the existing cluster. The tool works with any Linux server you can reach over SSH: bare-metal machines, virtual machines on AWS, Google Cloud, DigitalOcean, Civo, Linode, and others, as well as Raspberry Pi devices running at home or at the edge. There is also a local install mode if you want to set things up on the same machine you are running k3sup from. The free community edition covers install and join. A paid Pro version adds a plan-and-apply workflow where you describe the full cluster topology in a file, and k3sup installs everything in parallel. Pro also adds a command to pull the configuration from a cluster you did not originally set up with k3sup, and a command to run an arbitrary command across every node at once. k3sup runs on macOS, Linux, and Windows. The tool is distributed as a single binary with no external dependencies. The full README is longer than what was shown.

Copy-paste prompts

Prompt 1
Show me the exact k3sup install command to set up a k3s cluster on a DigitalOcean droplet using my SSH key
Prompt 2
How do I use k3sup join to add a second Raspberry Pi as a worker node to my existing k3s cluster?
Prompt 3
What flags do I pass to k3sup install to disable Traefik and set a custom cluster token?
Prompt 4
How do I use k3sup's local install mode to set up k3s directly on the machine I am sitting at?
Prompt 5
How do I merge the kubeconfig that k3sup downloads into my existing ~/.kube/config file?
Open on GitHub → Explain another repo

← alexellis on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.