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

Docs update resetting-a-machine.md to include example of reset cmd #10385

Merged
merged 1 commit into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 21 additions & 16 deletions website/content/v1.10/talos-guides/resetting-a-machine.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,23 @@ aliases:
- ../guides/resetting-a-machine
---

From time to time, it may be beneficial to reset a Talos machine to its "original" state.
Bear in mind that this is a destructive action for the given machine.
Doing this means removing the machine from Kubernetes, `etcd` (if applicable), and clears any data on the machine that would normally persist a reboot.
Occasionally, it may be necessary to reset a Talos machine to its "original" state.
Keep in mind that this is a destructive action for the given machine.
This process involves removing the machine from Kubernetes, `etcd` (if applicable), and clearing any data on the machine that would normally persist after a reboot.

## CLI

> WARNING: Running a `talosctl reset` on cloud VM's might result in the VM being unable to boot as this wipes the entire disk.
It might be more useful to just wipe the [STATE]({{< relref "../learn-more/architecture/#file-system-partitions" >}}) and [EPHEMERAL]({{< relref "../learn-more/architecture/#file-system-partitions" >}}) partitions on a cloud VM if not booting via `iPXE`.
`talosctl reset --system-labels-to-wipe STATE --system-labels-to-wipe EPHEMERAL`
To reset a machine, use the `talosctl reset` command:

The API command for doing this is `talosctl reset`.
There are a couple of flags as part of this command:
```sh
talosctl reset -n <node_ip_to_be_reset>
```

> WARNING: Running `talosctl reset` on cloud VMs might result in the VM being unable to boot as this wipes the entire disk.
> It might be more practical to only wipe the [STATE]({{< relref "../learn-more/architecture/#file-system-partitions" >}}) and [EPHEMERAL]({{< relref "../learn-more/architecture/#file-system-partitions" >}}) partitions on a cloud VM if not booting via `iPXE`.
> `talosctl reset --system-labels-to-wipe STATE --system-labels-to-wipe EPHEMERAL`

The command includes several flags:

```bash
Flags:
Expand All @@ -25,15 +30,15 @@ Flags:
--system-labels-to-wipe strings if set, just wipe selected system disk partitions by label but keep other partitions intact
```

The `graceful` flag is especially important when considering HA vs. non-HA Talos clusters.
If the machine is part of an HA cluster, a normal, graceful reset should work just fine right out of the box as long as the cluster is in a good state.
However, if this is a single node cluster being used for testing purposes, a graceful reset is not an option since Etcd cannot be "left" if there is only a single member.
In this case, reset should be used with `--graceful=false` to skip performing checks that would normally block the reset.
The `graceful` flag is particularly important when considering HA vs. non-HA Talos clusters.
If the machine is part of an HA cluster, a normal, graceful reset should work fine as long as the cluster is in a good state.
However, if this is a single-node cluster used for testing purposes, a graceful reset is not an option since `etcd` cannot be "left" if there is only a single member.
In this case, use the reset command with `--graceful=false` to skip checks that would normally block the reset.

## Kernel Parameter

Another way to reset a machine is to specify `talos.experimental.wipe=system` kernel parameter.
If the machine got stuck in the boot loop and you access to the console you can use GRUB to specify this kernel argument.
Then when Talos boots for the next time it will reset system disk and reboot.
Another method to reset a machine is by specifying the `talos.experimental.wipe=system` kernel parameter.
If the machine is stuck in a boot loop and you have access to the console, you can use GRUB to specify this kernel argument.
When Talos boots next, it will reset the system disk and reboot.

Next steps can be to install Talos either using PXE boot or by mounting an ISO.
The next steps can include installing Talos either using PXE boot or by mounting an ISO.
37 changes: 21 additions & 16 deletions website/content/v1.9/talos-guides/resetting-a-machine.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,23 @@ aliases:
- ../guides/resetting-a-machine
---

From time to time, it may be beneficial to reset a Talos machine to its "original" state.
Bear in mind that this is a destructive action for the given machine.
Doing this means removing the machine from Kubernetes, `etcd` (if applicable), and clears any data on the machine that would normally persist a reboot.
Occasionally, it may be necessary to reset a Talos machine to its "original" state.
Keep in mind that this is a destructive action for the given machine.
This process involves removing the machine from Kubernetes, `etcd` (if applicable), and clearing any data on the machine that would normally persist after a reboot.

## CLI

> WARNING: Running a `talosctl reset` on cloud VM's might result in the VM being unable to boot as this wipes the entire disk.
It might be more useful to just wipe the [STATE]({{< relref "../learn-more/architecture/#file-system-partitions" >}}) and [EPHEMERAL]({{< relref "../learn-more/architecture/#file-system-partitions" >}}) partitions on a cloud VM if not booting via `iPXE`.
`talosctl reset --system-labels-to-wipe STATE --system-labels-to-wipe EPHEMERAL`
To reset a machine, use the `talosctl reset` command:

The API command for doing this is `talosctl reset`.
There are a couple of flags as part of this command:
```sh
talosctl reset -n <node_ip_to_be_reset>
```

> WARNING: Running `talosctl reset` on cloud VMs might result in the VM being unable to boot as this wipes the entire disk.
> It might be more practical to only wipe the [STATE]({{< relref "../learn-more/architecture/#file-system-partitions" >}}) and [EPHEMERAL]({{< relref "../learn-more/architecture/#file-system-partitions" >}}) partitions on a cloud VM if not booting via `iPXE`.
> `talosctl reset --system-labels-to-wipe STATE --system-labels-to-wipe EPHEMERAL`

The command includes several flags:

```bash
Flags:
Expand All @@ -25,15 +30,15 @@ Flags:
--system-labels-to-wipe strings if set, just wipe selected system disk partitions by label but keep other partitions intact
```

The `graceful` flag is especially important when considering HA vs. non-HA Talos clusters.
If the machine is part of an HA cluster, a normal, graceful reset should work just fine right out of the box as long as the cluster is in a good state.
However, if this is a single node cluster being used for testing purposes, a graceful reset is not an option since Etcd cannot be "left" if there is only a single member.
In this case, reset should be used with `--graceful=false` to skip performing checks that would normally block the reset.
The `graceful` flag is particularly important when considering HA vs. non-HA Talos clusters.
If the machine is part of an HA cluster, a normal, graceful reset should work fine as long as the cluster is in a good state.
However, if this is a single-node cluster used for testing purposes, a graceful reset is not an option since `etcd` cannot be "left" if there is only a single member.
In this case, use the reset command with `--graceful=false` to skip checks that would normally block the reset.

## Kernel Parameter

Another way to reset a machine is to specify `talos.experimental.wipe=system` kernel parameter.
If the machine got stuck in the boot loop and you access to the console you can use GRUB to specify this kernel argument.
Then when Talos boots for the next time it will reset system disk and reboot.
Another method to reset a machine is by specifying the `talos.experimental.wipe=system` kernel parameter.
If the machine is stuck in a boot loop and you have access to the console, you can use GRUB to specify this kernel argument.
When Talos boots next, it will reset the system disk and reboot.

Next steps can be to install Talos either using PXE boot or by mounting an ISO.
The next steps can include installing Talos either using PXE boot or by mounting an ISO.