Introduction
talosctl is the command-line interface (CLI) for managing Talos Linux clusters. It provides comprehensive control over cluster operations, node management, and configuration tasks.
Installation
Using Package Managers
macOS (Homebrew)Manual Installation
Download the binary for your platform from the releases page:Configuration
Talosconfig File
talosctl uses a configuration file (talosconfig) to connect to Talos clusters. By default, it looks for the configuration in:
$TALOSCONFIGenvironment variable$HOME/.talos/config/var/run/secrets/talos.dev/config(service account mount path)
Configuration Structure
The talosconfig file contains:- Contexts: Named cluster configurations
- Endpoints: API endpoints to connect to
- Nodes: Target nodes for operations
- Certificates: Authentication credentials (CA, client cert, client key)
Global Flags
These flags are available for most talosctl commands:Path to the Talos configuration file. Defaults to
$TALOSCONFIG or ~/.talos/configTarget nodes for the operation. Can be specified multiple times:
-n node1 -n node2Override endpoints in the Talos configuration. Can be specified multiple times:
-e endpoint1 -e endpoint2Context to use from the talosconfig file
Cluster to connect to when using a proxy endpoint
Command Groups
Cluster Management Commands
Operations for creating and managing local Talos clusters:cluster create- Create a local clustercluster destroy- Destroy a local clustercluster show- Show cluster details
Node Operation Commands
Commands for managing running Talos nodes:reboot- Reboot a nodeshutdown- Shutdown a nodeupgrade- Upgrade Talos on a nodereset- Reset a node to factory defaultsbootstrap- Bootstrap etcd cluster
Configuration Commands
Commands for managing machine configurations:gen config- Generate configuration filesapply-config- Apply configuration to nodesconfig- Manage talosconfig fileedit- Edit machine configurationpatch- Patch machine configuration
Diagnostic Commands
Commands for troubleshooting and monitoring:dashboard- Interactive cluster dashboardhealth- Check cluster healthlogs- Stream service logsdmesg- View kernel messagesversion- Print version information
Examples
Basic Usage
Check versionConfiguration Management
Generate configurationWorking with Multiple Contexts
List contextsShell Completion
Enable shell completion for talosctl: BashNext Steps
- Main Command Reference - Complete reference for the talosctl command
- Cluster Commands - Learn about cluster management
- Node Commands - Explore node operations
- Config Commands - Manage configurations