Press "Enter" to skip to content

k3s quickstart

bist 0

Prerequisites

Additionally to having a bunch of VMs or bare-metal servers, it is also required to have two password-less SSH login and password-less sudo already being setup in order to use k3sup.

Make sure you have certifcate base logins enabled on the target machines AND passwordless SUDO

Of course, the tool k3sup is also needed. It can be installed by executing the following(on your local machine):

curl -sLSf https://get.k3sup.dev | sh
sudo install -m k3sup /usr/local/bin/

Cluster Installation

With everything in place, the k3s server can be installed with

k3sup install --ip <ip-of-server> --user <user-name> --local-path ~/.kube/config --context <mycontext>

Or, in case you want to provide the hostname instead of an IP

k3sup install --host <hostname-of-server> --user <user-name> --local-path ~/.kube/config --context <mycontext>

For some reason the server address in .kube/config was server: https://127.0.0.1:6443, I have changed this to my host by hand.

The agents are joined by executing this statement:

k3sup join --ip <agent-hostname> --server-ip <server-hostname> --user <username>

A good test on the local machine is to list all the nodes with

kubectl get nodes

Enjoy!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.