You need some VMs prepared with passwordless SSH login for user ansible set up. See inventories in site/.
To run:
$ ansible-playbook k3s.yml -i site/whatever \
--tags=choose_a_tag --ask-vault-password
(Vault password is only required for apps_install, password is 'password' for this demo system.)
Tags must be specified as all plays have the 'never' tag.
Current tags:
To set up a cluster, run install, bootstrap and apps_install in that order.
To test the cluster, run smoke_test.
To delete the cluster, run destroy_cluster.
To start the cluster, run start_cluster.
To stop the cluster, run stop_cluster.
To do a rolling restart of the cluster, run rolling_restart. To just rolling restart the k3s service, run rolling_service_restart.
To take a snapshot, run snapshot. To revert to the current snapshot, run revert_snapshot.
The allwall tag is to send a message to all consoles in the cluster, viz:
ansible-playbook -i site/work k3s.yml --tags allwall \
-e'msg="This is my test message. Restart of \
subradiante in 10 microfleems."'
Of course the message must be encapsulated in quotes, or you will only send the first word.
Clone rhel86-playground eight times:
Change UUIDs:
Add ansible.
Stop password expiring.
Ensure legacy iptables is installed as k3s doesn't support nftables. (? looks like it's out of date per https://github.com/k3s-io/k3s/issues/1812) Download and install iptables-1.6.2-2 from Fedora 28.
Setenforce 0. Don't need SEL for this but will on actual deployment. Probably.
https://homeautomation.wiki/kubernetes-homelab-with-k3s-and-raspberry-pi-4/
Server died.
https://docs.tigera.io/calico/latest/getting-started/kubernetes/k3s/quickstart
https://homeautomation.wiki/kubernetes-l4-loadbalancing-with-metallb/
Server died.
https://github.com/kelseyhightower/kubernetes-the-hard-way
https://www.vmguru.com/2021/04/how-to-install-rancher-on-k3s/