Home k3sup (said 'ketchup')
Post
Cancel

k3sup (said 'ketchup')

k3sup is a light-weight utility to get from zero to KUBECONFIG with k3s on any local or remote VM. All you need is ssh access and the k3sup binary to get kubectl access immediately. The tool is written in Go and is cross-compiled for Linux, Windows, MacOS and even on Raspberry Pi. How do you say it? Ketchup, as in tomato.

source: https://github.com/alexellis/k3sup
source: https://ma.ttias.be/deploying-highly-available-k3s-k3sup/

  • You will need, at a minimum, one “workstation” machine, one “master” Kubernetes node (control plane) and one “worker” node.
  • You can have multiple “master” nodes (which is a good idea).
  • You should have multiple “worker” nodes.
  • All nodes should use the same OS and version. I used Ubuntu 22
  • All master and worker nodes should use a static IP
  • All nodes should run the following:
    1
    2
    3
    
    sudo apt update
    sudo apt -y upgrade
    sudo reboot
    
  • The master and worker nodes should allow for passwordless login from the “workstation” to each node
  • The master and worker nodes should allow for passwordless sudo access.

Installing k3sup on the “workstation”

1
2
3
curl -sLS https://get.k3sup.dev | sh
sudo install k3sup /usr/local/bin/
k3sup --help

Installing the first master node

1
k3sup install --ip IP_first_master --user ssh_username --cluster

This will install Kubernetes on the master node and get it all set up.

Installing and joining the second master nodes

1
k3sup join --ip IP_second_master --user ssh_username --server-user ssh_username --server-ip IP_first_master --server

Installing and joining worker nodes

1
k3sup join --ip IP_worker_node --server-ip ip_MASTER_NODE --user ssh_username

This is a very quick way to spin up a highly available Kubernetes cluster very quickly.

This post is licensed under CC BY 4.0 by the author.