mthr CLI: use Kubernetes resources for declarative or large-scale management,
or use mthr as a convenient command-line workflow.
Your compute resources appear in your tenant namespace as Kubernetes objects,
so you can manage them with ordinary kubectl commands:
virtualmachines— your macOS virtual machines.baremetalmachines— your allocated bare-metal Macs.
compute.mountthor.com API group. List and
inspect them the same way you would any Kubernetes object — for example
kubectl get virtualmachines or kubectl get baremetalmachines — subject to
your role’s permissions.
Before provisioning compute, set up your billing information and top up your
prepaid balance in the Mount Thor portal.
Generate a kubeconfig
Sign in first, then write the kubeconfig to a path:--out to be prompted
for a path; the default is ~/.kube/mount-thor. Use --out - to write the
kubeconfig to stdout.
Use it
Pointkubectl at the generated file:
kubectl --kubeconfig ~/.kube/mount-thor. The
kubeconfig’s default namespace is your tenant’s namespace (mthr-<tenant>), so
bare commands target the right place without -n.
Provision a bare-metal Mac
Createmy-mac.yaml:
mthr bm desktop my-mac for desktop access. The CLI opens the
connection locally and keeps the access session active while the command runs.
Delete the resource to release the Mac:
Provision a virtual machine
A VM created with Kubernetes needs an SSH public key for access. Create a dedicated key pair for this VM, or use an existing key pair:my-vm.yaml. Replace SSH_PUBLIC_KEY with the contents of
./my-vm-key.pub. The public key is safe to include in the manifest; never
include the private key.
mthr vm desktop my-vm for desktop access. See Virtual
machines for the VM preview and connection details.
Delete the resource when finished:
mthr vm create workflow manages an SSH key automatically. When
provisioning through Kubernetes, you provide the public key explicitly so the
matching private key can remain under your control.
Staying signed in
The kubeconfig file does not expire. It embeds an exec credential plugin that refreshes your access automatically in the background, sokubectl keeps working
without regenerating the file.
Binary path
By default the embedded exec plugin invokesmthr by name, so mthr must be on
your $PATH for kubectl to work. For installs where it is not, bake an
explicit path into the kubeconfig:
MOUNTTHOR_KUBECONFIG_EXEC_COMMAND
environment variable.
Credentials and revocation
No secret is stored in the kubeconfig file. The exec plugin supplies a short-lived client certificate tokubectl on demand.
Revoke the Kubernetes access session and clear the cached credential with:
Permissions
Generating a kubeconfig and authenticating does not by itself grant permissions inside the cluster. What you can do is governed by your assigned role. Ifkubectl returns Forbidden, that is an authorization matter for your role, not
a problem with the kubeconfig.
For the CLI workflow, see Bare metal or Virtual
machines.