Skip to content

Add reset command to uninstall k3s from nodes#437

Open
Gu1llaum-3 wants to merge 3 commits intoalexellis:masterfrom
Gu1llaum-3:add-reset-command
Open

Add reset command to uninstall k3s from nodes#437
Gu1llaum-3 wants to merge 3 commits intoalexellis:masterfrom
Gu1llaum-3:add-reset-command

Conversation

@Gu1llaum-3
Copy link
Copy Markdown

@Gu1llaum-3 Gu1llaum-3 commented Jul 12, 2024

Add Reset Command to uninstall k3s from nodes

Why do you need this?

This change is needed to provide a convenient way to uninstall k3s from nodes using the same tool that was used to install it. This functionality is useful for testing and maintenance, as it allows users to easily reset their cluster without having to manually connect to each node to perform the uninstallation like k0sctl use.

Description

This PR adds a new reset command to the k3sup tool. The reset command allows users to uninstall k3s from specified nodes. It supports both single node and multiple nodes through a JSON plan file.

Features

  • Uninstall k3s from a single node using SSH.
  • Uninstall k3s from multiple nodes using a JSON plan file.
  • Provides a summary of successful and failed uninstalls at the end.

Usage

  • For a single node:
    k3sup reset --user <username> --ip <host_ip> --ssh-key <path_to_private_key>

  • For a multiple nodes:
    k3sup reset --hosts <path_to_hosts.json> --user <username> --ssh-key <path_to_private_key>

@derek
Copy link
Copy Markdown

derek bot commented Jul 12, 2024

Thank you for your contribution. unfortunately, one or more of your commits are missing the required "Signed-off-by:" statement. Signing off is part of the Developer Certificate of Origin (DCO) which is used by this project.

Read the DCO and project contributing guide carefully, and amend your commits using the git CLI. Note that this does not require any cryptography, keys or special steps to be taken.

💡 Shall we fix this?

This will only take a few moments.

First, clone your fork and checkout this branch using the git CLI.

Next, set up your real name and email address:

git config --global user.name "Your Full Name"
git config --global user.email "you@domain.com"

Finally, run one of these commands to add the "Signed-off-by" line to your commits.

If you only have one commit so far then run: git commit --amend --signoff and then git push --force.
If you have multiple commits, watch this video.

Check that the message has been added properly by running "git log".

Signed-off-by: Gu1llaum-3 <archambault.guillaume06@gmail.com>
Signed-off-by: Gu1llaum-3 <archambault.guillaume06@gmail.com>
@derek derek bot removed the no-dco label Jul 14, 2024
@derek derek bot added the no-dco label Nov 10, 2024
@derek
Copy link
Copy Markdown

derek bot commented Nov 10, 2024

Thank you for your contribution. unfortunately, one or more of your commits are missing the required "Signed-off-by:" statement. Signing off is part of the Developer Certificate of Origin (DCO) which is used by this project.

Read the DCO and project contributing guide carefully, and amend your commits using the git CLI. Note that this does not require any cryptography, keys or special steps to be taken.

💡 Shall we fix this?

This will only take a few moments.

First, clone your fork and checkout this branch using the git CLI.

Next, set up your real name and email address:

git config --global user.name "Your Full Name"
git config --global user.email "you@domain.com"

Finally, run one of these commands to add the "Signed-off-by" line to your commits.

If you only have one commit so far then run: git commit --amend --signoff and then git push --force.
If you have multiple commits, watch this video.

Check that the message has been added properly by running "git log".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant