talosctl is the primary CLI tool to interact with a Talos Linux cluster.
It is used for bootstrapping, operating, and debugging Talos nodes and clusters.
Unlike traditional Kubernetes nodes, Talos has no SSH and no shell access.
Everything is done via talosctl over the Talos API.
Before using talosctl, it helps to understand a few key ideas:
KUBECONFIGtalosctl talks totalosctl connects here)talosctl operates on these)If you operate more than one Talos cluster, switching TALOSCONFIG manually becomes tedious.
To solve this, I use a small shell helper to list and switch configs quickly.
## Export Talosconfigs ##
talosconfig () {
export TALOSCONFIG="${HOME}/.talos/config"
ls ${HOME}/.talos/configs | sed s/.conf//g
export TALOSCONFIG="${HOME}/.talos/configs/$1.conf"
}
complete -W "$(ls -1 ~/.talos/configs | sed s/.conf//g)" talosconfig
~/.talos/
├── config # default / active config
└── configs/
├── prod.conf
├── staging.conf
└── homelab.conf
talosconfig homelab
talosctl CommandsMost talosctl commands require target nodes to be defined.
If no nodes are set, talosctl will fail with an explicit error instead of guessing.
You can define nodes in one of the following ways:
talosctl --nodes 10.0.0.10 <command>
export TALOSCTL_NODES=10.0.0.10
cat ~/.talos/configs/homelab.conf |yq '.contexts[].endpoints[]'
talosctl health
Quickly verifies:
talosctl get members
Shows cluster membership and roles.
talosctl get machines
talosctl logs kubelet
talosctl logs etcd
talosctl logs containerd
Talos logs are structured and streamed, making them ideal for debugging.
talosctl dmesg
talosctl mounts
talosctl get disks
talosctl services
These commands replace traditional Linux tools (dmesg, lsblk, systemctl, …).