Single Node k3s cluster
This section describe examples on how to deploy Kairos with k3s as a single-node cluster
In the example below we will use a bare metal host to provision a Kairos node in the local network with K3s.
Installation
Use the provider-kairos artifacts which contains k3s.
Follow the Installation documentation, and use the following cloud config file with Kairos:
#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
Notably:
- We use the
k3sblock to disabletraefikandservicelb(the defaultk3sload balancer). - We use
write_filesto write manifests to the defaultk3smanifest directory (/var/lib/rancher/k3s/server/manifests/) see docs to deployMetalLBand configure it with the192.168.1.10-192.168.1.20IP range. Make sure to pick up a range which doesn’t interfere with your local DHCP network.
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)