part of my homelab on an intel nuc running debian
k3s is lightweight enough, for home usage. i have more than a few containers running, and compose takes time to setup as well.
this will install k3s with ansible on debian.
included components:
- k3s
- metallb
- traefik
- prometheus
- grafana
- elasticsearch
- nfs-client-provisioner (nfs server must exist, otherwise remove the chart)
I am using a public domain for the traefik lb and i am getting letsencrypt wildcard certificates with dns-01 challenge. Domain is hosted on ovh.
this is tied to my setup, but should be generic enough to use it right away. some changes in the helm values files may be required for the traefik config if you want to use self signed certs, though.
- ansible
- rsync (i am using the synchronize module for faster copy speed n ansible)
- ssh-key auth, this will not work with password auth
clone or edit the inventory and run it on a debian server. may run without problems on ubuntu, but haven't tested.
after that run
ansible-playbook -i inventories/example-inventory install.yml
user: admin
password: from your inventory
user: elastic
password: kubectl -n logging get secret elasticsearch-es-elastic-user -o=jsonpath='{.data.elastic}' | base64 --decode
basic auth is from your inventory
issues or pull requests are very welcome