Command · pk-metal
pk-metal wipe
changes machinesneeds the cluster
pk-metal wipe asks for a wipe of one released machine.
The operator proposes an operation that boots a Talos image, and that image erases the system disk. A person approves it.
Synopsis
Section titled “Synopsis”pk-metal wipe [--talos-version v] <host><host>- The name of the Host.
| Flag | Default | Description |
|---|---|---|
--talos-version<string> | - | Talos version of the wipe image (default: the version of the node's cluster). |
This command also accepts the global flags --kubeconfig and --context.
When a machine needs a wipe
Section titled “When a machine needs a wipe”Usually, the operator resets a machine through Talos when it releases the Host. If the node did not answer at that time, the operator could not reset it. The disk can still hold the node, with the credentials of its cluster.
The operator then marks the Host:
- The annotation
metal.platform-kit.org/disk-not-wipednames the cluster and the node. - The condition
DiskWipedis False. - The operator installs nothing on the Host until the wipe is complete.
What it does
Section titled “What it does”- The command reads the Host. It refuses a Host that has no such mark.
- It finds the Talos version for the wipe image. The default is the version of the cluster that the node was in.
- It sets the annotation
metal.platform-kit.org/wipeon the Host. The value is the Talos version. - The operator proposes a HostOperation with the reason
Wipe. Approve it with pk-metal approve. - The operation boots the image. The image erases the system disk and stops there.
If the cluster of the node does not exist, give the version with --talos-version.
Examples
Section titled “Examples”pk-metal wipe simhw2288v5000400
host simhw2288v5000400: wipe asked for (it may still hold node lab/w-1).
The operator proposes an operation that boots a Talos v1.14.6 image which erases the system disk; approve it with: pk-metal approve
A Host that the operator reset through Talos needs no wipe.
pk-metal wipe simhw2288v5000399
pk-metal: host simhw2288v5000399 is not marked as holding an install (metal.platform-kit.org/disk-not-wiped); a release that reset it through Talos wiped it already
Objects
Section titled “Objects”| Object | Access | Purpose |
|---|---|---|
| Host | get, patch | Reads the mark. Sets the annotation metal.platform-kit.org/wipe. |
| TalosCluster | get | Reads the Talos version, when you do not give --talos-version. |
Exit status
Section titled “Exit status”Related
Section titled “Related”- Release a host
- pk-metal replace and pk-metal scale need a wiped Host.
- pk-metal reinstall wipes a node and installs it again.
- Host controller