Skip to content

Reference · pk-metal

Global flags

Two flags select the cluster that a command talks to. They follow the rules of kubectl.

FlagDefaultDescription
--kubeconfig<file>-The kubeconfig file. Without the flag, the program uses $KUBECONFIG, then ~/.kube/config, then the account of the pod that it runs in.
--context<name>-The context in the kubeconfig. Without the flag, the program uses the current context.

Put the global flags before the command or after it. The two forms are equal. The flags of a command can also come after its arguments. After --, each word is an argument.

global flags
pk-metal --context kind-pk-metal status
pk-metal status --context kind-pk-metal
pk-metal --kubeconfig .lab/kubeconfig top

All commands that talk to the Kubernetes API accept the global flags:

These commands do not talk to the Kubernetes API, and they refuse the global flags after the command: pk-metal check, pk-metal inventory, pk-metal render, pk-metal boot, pk-metal bootstrap, pk-metal relay, pk-metal sim and pk-metal version.

Some commands read a secret from the environment. A secret is never a flag, so it does not show in the process list.

Variable Used by Content
KUBECONFIG All commands that talk to the cluster The kubeconfig file, when --kubeconfig is not set.
PK_METAL_BMC_PASSWORD pk-metal check, pk-metal inventory, pk-metal boot The password of the BMC user.
PK_METAL_RELAY_SECRET pk-metal relay, pk-metal boot The shared secret of the relay.