Skip to content

Command · pk-metal

pk-metal top

changes machinesneeds the cluster

pk-metal top shows one tile for each machine and updates the tiles when the cluster changes. Three keys do the same work as pk-metal approve, pk-metal hold and pk-metal retry.

pk-metal top [--fleet url] [--workload-kubeconfig file]

The command takes no arguments. It needs a terminal. In a script, use pk-metal status.

FlagDefaultDescription
--fleet<string>-The simulator's state endpoint, for example http://127.0.0.1:8440/state (default: none, real hardware).
--interval<duration>2sHow often the fleet and the console logs are read again; cluster objects update as they change.
--workload-kubeconfig<string>-Kubeconfig of the workload cluster, to show its Nodes' Ready condition (default: none).

This command also accepts the global flags --kubeconfig and --context.

Header
Each TalosCluster and the number of its nodes that are Ready.
Tile
One machine: its BMC, the phase of the Host and its block, the claim, the operation and the TalosNode.
Operation line
The step that runs, for example 5/9 setBootOverride, or a mark that the operation waits for approval.
With --fleet
The state of the simulated BMC: power, media, boot override and the last Redfish call. Also the state of the virtual machine and the last console lines.
With --workload-kubeconfig
The Ready condition of each node in the workload cluster.

Without --fleet, the command works the same with real hardware.

Key Effect
Tab, arrows Select a machine.
a Show the plan of the operation that waits for approval. Then y approves it. All other keys change nothing.
h Hold the claim of the machine, or remove the hold.
r Retry the failed operation of the machine.
q, Escape Stop the program.

The key a follows the rules of pk-metal approve. If the plan is on the screen for more than five minutes, y approves nothing. Push a again. If the operation or its plan changed after the program showed it, the approval fails and nothing changes.

Watch real hardware.

Terminal window
pk-metal top

Watch the virtual lab. The simulator serves the state of its machines on port 8440.

Terminal window
pk-metal --kubeconfig .lab/kubeconfig top --fleet http://127.0.0.1:8440/state

In the lab, mise run lab:up prints this command with the correct paths.

Object Access Purpose
Host, ManagementEndpoint, HostClaim, HostOperation list, watch The tiles.
TalosCluster, TalosNode list, watch The header and the node line.
HostOperation patch, delete The keys a and r.
HostClaim patch The key h.
Nodes of the workload cluster list, watch Only with --workload-kubeconfig.
CodeMeaning
0Success.
1Error; the message is on stderr, as "pk-metal: <message>".

The command gives code 1 if stdin or stdout is not a terminal.