Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to upgrade a cluster deployed with ansible-role-k3s playbook? #83

Closed
ieugen opened this issue Jan 18, 2021 · 4 comments · Fixed by #87
Closed

How to upgrade a cluster deployed with ansible-role-k3s playbook? #83

ieugen opened this issue Jan 18, 2021 · 4 comments · Fixed by #87
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@ieugen
Copy link

ieugen commented Jan 18, 2021

Hi,

I've deployed a cluster with this ansible playbook and I would like to upgrade it to a patch version of kubernetes.
It's not clear to me how can I do that.

Can you share some the list of steps that I need to do?
I can try them out and add them to the documentation.

I've also noticed the documentation does not cover this steps https://github.com/PyratLabs/ansible-role-k3s/tree/main/documentation .

p.s. I'm using version 1.17.4 of this playbook.

@xanmanning xanmanning self-assigned this Jan 19, 2021
@xanmanning xanmanning added enhancement New feature or request question Further information is requested labels Jan 19, 2021
@ieugen
Copy link
Author

ieugen commented Jan 20, 2021

I would also like to mention that I'm using ansible 2.9 (which comes with Debian Stable and Ubuntu 20.04).
This limits my ability to adopt version 2.x of this project.

I don't think I would upgrade to 2.10 until it reaches the Debian repositories.
One of the reasons is that I'm not familiar with python ecosystem to take that part on.

https://tracker.debian.org/pkg/ansible
https://packages.ubuntu.com/focal/ansible

I manage multiple servers and it's very costly when I have to maintain/install software outside the main repo - and I try to avoid getting into these situations.
I'm mentioning this since I'm probably not the only one.

Perhaps you would take this into consideration when deciding the baseline ansible version (and other packages).
This was meant to be of help for you.

Thank you for working on this.

Regards,

@xanmanning
Copy link
Member

I manage multiple servers and it's very costly when I have to maintain/install software outside the main repo

How many Ansible controllers do you have?

Yes this is a piece of documentation I'm yet to write.

Upgrade should be possible by changing k3s_release_version to your desired version. The controllers (servers) are updated first then nodes (workers) are updated second, see below:

https://rancher.com/docs/k3s/latest/en/upgrades/basic/

v2.x may work with 2.9 in practice more, but some FQCNs were buggy when I last attempted it some months ago (eg. set_fact). I'll investigate but I can't commit to a timeline.

@xanmanning
Copy link
Member

Hi @ieugen

Because of this bug the minimum 2.9 ansible version supported is 2.9.17. Below is the error received for any versions below 2.9.17 (tested on 2.9.16):

Screenshot from 2021-01-24 12-07-42

This is because I have moved on to using FQCNs as I may start adding specific module collections to interact with k3s (for example the community.kubernetes collection) and I want to ensure the correct collection is being addressed. The Debian repo you pointed out will allow this version to be installed, but your Ubuntu repos are behind.

These requirements can be met by installing Ansible with pip

https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html#installing-ansible-with-pip

If you need an Ansible role to install Ansible with pip, then check out geerlingguy.ansible

I manage multiple servers and it's very costly when I have to maintain/install software outside the main repo - and I try to avoid getting into these situations.

After all, what is Ansible for if not to reduce the cost and remove the pain of managing systems 😉

I am working on changing my requirements.txt, the ansible check and updating the documentation for doing K3s updates.

@ieugen
Copy link
Author

ieugen commented Jan 25, 2021

Thank you very much @xanmanning for taking the time and considering this issue.
I'm on 2.9.16 so I will have to upgrade and instruct the others to do the same.

Have a great day,
Eugen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants