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

K3s Cluster Node(s) Upgrade #132

Closed
nicklausbrown opened this issue Aug 2, 2023 · 8 comments
Closed

K3s Cluster Node(s) Upgrade #132

nicklausbrown opened this issue Aug 2, 2023 · 8 comments
Assignees
Labels
kind/documentation Improvements or additions to documentation size/S status/stale
Milestone

Comments

@nicklausbrown
Copy link

Hello @xunleii,

I did not see a discussions area for the repo, so I will ask my question here as it seems undocumented. Can this terraform module appropriately upgrade a k3s cluster similar to what is described in the "manual" part of the documentation here. If not is there another recommended way to handle version upgrades gracefully?

Otherwise, thanks for open sourcing this project. I haven't finished implementing it yet, but it makes operations a lot easier.

@xunleii xunleii added size/M kind/enhancement New feature or request labels Aug 3, 2023
@xunleii xunleii self-assigned this Aug 3, 2023
@xunleii xunleii removed size/M kind/enhancement New feature or request labels Aug 3, 2023
@xunleii
Copy link
Owner

xunleii commented Aug 3, 2023

Hi @nicklausbrown,

I've just checked (and tested) and here the upgrade process using followed by this module :

  1. Downloads the latest installation script from Github
  2. Reruns the installation script with the new k3s release
  3. Waits until the node is ready

I therefore confirm that this module follows the official upgrade procedure by using the official installation script.

However, a word about the upgrade procedure wouldn't go amiss, thanks for bringing it up.

EDIT: replace using by followed by in order to avoid any misunderstanding

@xunleii xunleii added size/S kind/documentation Improvements or additions to documentation labels Aug 3, 2023
@laurentiusoica
Copy link

@xunleii During the upgrade process, I noticed that all the nodes get upgraded simultaneously. This leads to a situation where all the master nodes are unavailable for a certain duration. Is there an option to perform the upgrades one after another instead?

@xunleii
Copy link
Owner

xunleii commented Sep 19, 2023

Yep, thank you for that. Indeed, there is no mechanism to have a non-parallel update. I did it because there is little downtime (in most cases) and I didn't want to make this module too complicated.

However, if it's something really blocking, I can make the first server serve as a dependency for the others. With this, there will always be at least one server available to communicate with, but I'll also have to find out if there's a risk of split brain N-1 servers updating at the same time.

@laurentiusoica
Copy link

Not exactly a blocker but it breaks the HA guarantees in case of an HA setup. An option to have an one node at a time upgrade would be great.

@laurentiusoica
Copy link

@xunleii What are your thoughts on introducing a feature flag for sequential execution that would, when enabled, enforce a sequential creation of servers and agents by adding a depends_on attribute to the preceding resource when the index is greater than 0? When this flag is disabled, which would be the default setting, the current behavior would be maintained.

@xunleii
Copy link
Owner

xunleii commented Oct 18, 2023

@xunleii What are your thoughts on introducing a feature flag for sequential execution that would, when enabled, enforce a sequential creation of servers and agents by adding a depends_on attribute to the preceding resource when the index is greater than 0? When this flag is disabled, which would be the default setting, the current behavior would be maintained.

I agree with you, it can be very useful.
Unfortunately, I don't see how to implement it on Terraform; because it's a module and not a provider, I'm very limited on what I can do. For example here, node resources are created by a loop and all are made in parallel. I don't see how I can make it sequential instead 😞

@xunleii xunleii added this to the v3.4.0 milestone Oct 22, 2023
@xunleii xunleii pinned this issue Oct 24, 2023
@xunleii xunleii modified the milestones: v3.4.0, v4.0.0 Nov 10, 2023
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. If the issue still persists, please leave a comment and it will be reopened.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 18, 2023
@xunleii xunleii reopened this Jan 4, 2024
Copy link
Contributor

github-actions bot commented Feb 4, 2024

This issue has been automatically marked as stale because it has not had recent activity. If the issue still persists, please leave a comment and it will be reopened.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/documentation Improvements or additions to documentation size/S status/stale
Projects
None yet
Development

No branches or pull requests

3 participants