Linux command
talosctl 命令
网络
复制后可按需替换文件名、目录或参数。
常用示例
Generate configuration
talosctl gen config [cluster-name] [https://endpoint:6443]
Apply configuration
talosctl apply-config --nodes [192.168.1.10] --file [controlplane.yaml]
Bootstrap cluster
talosctl bootstrap --nodes [192.168.1.10]
Get cluster info
talosctl --nodes [192.168.1.10] dashboard
Show services
talosctl --nodes [192.168.1.10] services
View logs
talosctl --nodes [192.168.1.10] logs [kubelet]
Get kubeconfig
talosctl kubeconfig --nodes [192.168.1.10]
说明
talosctl is the command-line tool for managing Talos Linux, a minimal and immutable operating system purpose-built for running Kubernetes. It provides complete lifecycle management for Talos nodes, from initial configuration generation through ongoing cluster operations. The gen config command creates machine configuration files for control plane and worker nodes, including certificates and secrets needed for secure cluster communication. The apply-config command pushes these configurations to nodes, and bootstrap initializes the etcd cluster on the first control plane node to start the Kubernetes cluster. For day-to-day operations, talosctl provides a dashboard for monitoring node health and resource usage, services for inspecting running system services, and logs for viewing service output. The kubeconfig command retrieves cluster credentials for use with kubectl. All communication with nodes uses mutual TLS authentication configured through the talosconfig file.
参数
- --nodes _NODES_
- Target nodes.
- --endpoints _ENDPOINTS_
- API endpoints.
- -n _NODE_
- Single node.
- --talosconfig _FILE_
- Config file.
FAQ
What is the talosctl command used for?
talosctl is the command-line tool for managing Talos Linux, a minimal and immutable operating system purpose-built for running Kubernetes. It provides complete lifecycle management for Talos nodes, from initial configuration generation through ongoing cluster operations. The gen config command creates machine configuration files for control plane and worker nodes, including certificates and secrets needed for secure cluster communication. The apply-config command pushes these configurations to nodes, and bootstrap initializes the etcd cluster on the first control plane node to start the Kubernetes cluster. For day-to-day operations, talosctl provides a dashboard for monitoring node health and resource usage, services for inspecting running system services, and logs for viewing service output. The kubeconfig command retrieves cluster credentials for use with kubectl. All communication with nodes uses mutual TLS authentication configured through the talosconfig file.
How do I run a basic talosctl example?
Run `talosctl gen config [cluster-name] [https://endpoint:6443]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --nodes _NODES_ do in talosctl?
Target nodes.