Multi Node k3s cluster
This section describe examples on how to deploy Kairos with k3s as a multi-node cluster
In the example below we will use a bare metal host to provision a Kairos cluster in the local network with K3s and one master node.
Installation
Use the provider-kairos artifacts which contains k3s
.
Follow the Installation documentation, and use the following cloud config file with Kairos for the master and worker:
#cloud-config
hostname: metal-{{ trunc 4 .MachineID }}
users:
- name: kairos
# Change to your pass here
passwd: kairos
ssh_authorized_keys:
# Replace with your github user and un-comment the line below:
# - github:mudler
k3s:
enabled: true
args:
- --disable=traefik,servicelb
#cloud-config
hostname: metal-{{ trunc 4 .MachineID }}
users:
- name: kairos
# Change to your pass here
passwd: kairos
ssh_authorized_keys:
# Add your github user here!
- github:mudler
k3s-agent:
enabled: true
env:
K3S_TOKEN: ...
K3S_URL: ...
Deploy first the server; the value to use for K3S_TOKEN
in the worker is stored at /var/lib/rancher/k3s/server/node-token on your server node.
Notably:
- we use the
k3s
block to disabletraefik
andservicelb
(the defaultk3s
load balancer) - You can add additional configuration as args to k3s here, see k3s documentation
Feedback
Was this page helpful?
Awesome! Glad to hear it! Please tell us how we can improve.
Oh snap! Sorry to hear that. Please tell us how we can improve.
Last modified January 11, 2023: :book: Add examples and bundles section (#618) (1cb4996)