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.
Synopsis
Section titled “Synopsis”pk-metal top [--fleet url] [--workload-kubeconfig file]The command takes no arguments. It needs a terminal. In a script, use pk-metal status.
| Flag | Default | Description |
|---|---|---|
--fleet<string> | - | The simulator's state endpoint, for example http://127.0.0.1:8440/state (default: none, real hardware). |
--interval<duration> | 2s | How 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.
What it shows
Section titled “What it shows”- 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.
Examples
Section titled “Examples”Watch real hardware.
pk-metal topWatch the virtual lab. The simulator serves the state of its machines on port 8440.
pk-metal --kubeconfig .lab/kubeconfig top --fleet http://127.0.0.1:8440/stateIn the lab, mise run lab:up prints this command with the correct paths.
Objects
Section titled “Objects”| 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. |
Exit status
Section titled “Exit status”The command gives code 1 if stdin or stdout is not a terminal.
Related
Section titled “Related”- pk-metal status gives the same facts for scripts.
- Simulated BMC describes the state endpoint of the simulator.
- Approve, hold, retry and abort
- Your first cluster in the lab