Project Description

The project k3s-ansible helps to easily install and manage k3s clusters and it's particularly handy for users who use ansible for daily operations. I personally prefer it than using k3sup and scripts because i have ansible set up in almost all my computers. Having used it for a while i noticed that the project lacks of some functionalities so i thought why not giving a go and try tinkering with it during the hackweek. https://github.com/k3s-io/k3s-ansible

Goal for this Hackweek

List of things may nice to have which i believe are currently missing:

  • [x] Multi server installations with embedded etcd (variable extra_server_args does not seem sufficient to achieve this?)
  • [x] *SUSE systems requirements/optimisation
  • [ ] Server/agent Upgrade task
  • [ ] installation leveraging config file: https://rancher.com/docs/k3s/latest/en/installation/install-options/#configuration-file
  • [ ] Log collection - Stats with facts

Resources

I have found other similar interesting projects here that could benefit from each other effort and collaboration, for instance:

https://hackweek.opensuse.org/21/projects/geekoops-reusable-ansible-roles-for-opensuse

Similarly I have an ongiong project on github which uses ansible to spin VMs (leap and SLES 15 so far). This k3s project could be added there as an ansible role and so on...

https://github.com/gnuninu/kwinble

Looking for hackers with the skills:

Nothing? Add some keywords!

This project is part of:

Hack Week 21

Activity

  • over 2 years ago: nicoladm started this project.
  • over 2 years ago: ph03nix liked this project.
  • over 2 years ago: nicoladm originated this project.

  • Comments

    • nicoladm
      over 2 years ago by nicoladm | Reply

      I have forked k3s-anisble and created a branch "multiserver-HA-etcd" https://github.com/k3s-io/k3s-ansible/compare/master...gnuninu:k3s-ansible:multiserver-HA-etcd.

      HA multiserver deployments with etcd are now supported by specifying the hosts under [multiserver] in the hosts.ini and the arguments can be passed in the dedicated variable extra_multiserver_args independently from the master node. Example of a multiserver HA etcd installation is:

      [master]

      192.168.122.156

      [multiserver]

      192.168.122.174

      192.168.122.120

      and

      extra_server_args: "--cluster-init"

    • nicoladm
      over 2 years ago by nicoladm | Reply

      I am currently working on adding requirements/optimisation for *SUSE systems. The aim is to share my resulting works with the geekoops project: https://hackweek.opensuse.org/21/projects/geekoops-reusable-ansible-roles-for-opensuse

      I am also part of that project too now so there is still a lot to have fun with!

    • nicoladm
      over 2 years ago by nicoladm | Reply

      Finally i have a PR which includes the work done in the following branches:

      • multiserver-HA-etcd
      • SUSEsystemsprereqs

      The prerequisites for *SUSE systems have been added, now the installation of k3s is supported without disabling firewalld which makes it more suitable for production environment. Firewalld config and rules are removed when reset.yml is run. The config will be fully rolled back to its original state.

    Similar Projects

    This project is one of its kind!