K3s

1 item

k3s

Multi master with k3s

Source

Start the first master

curl -sfL https://get.k3s.io | sh -s - --no-deploy=traefik  --cluster-init

check the node (you should have one)

kubectl get nodes

Get the token

cat /var/lib/rancher/k3s/server/node-token

Start another master

curl -sfL https://get.k3s.io | sh -s - --no-deploy=traefik --server https://IP:6443 --token "TOKEN"

Enjoy :heart:

Archived

Cool links:

Questions ? (for me)

  • Package manager ? (apt equivalent)

Installation

  • Download executable (https://k3os.io/ not https://k3s.io/ if you want k3s as your OS)
  • Boot
  • Change rancher password : sudo passwd rancher
  • Connect with ssh

Setup

  • Install OS: sudo os-config
  • Special part (Config system with cloud-init file?)
  • Install as server
  • token or cluster secret will be require when you want to add a new node to your cluster
  • One you have installed k3s, you should rechange the password ! (First time you changed it to the OS loaded in ram)
  • Try kubectl get nodes. Finish !

Add ssh key

Here https://github.com/rancher/k3os/blob/master/README.md#configuration-reference there is an example of /var/lib/rancher/k3os/config.yaml which is a file readed at the boot of k3s. It allows you to specify public keys.

Read more →
kubernetes k8s