| name | talos-helper |
| description | Talos Linux cluster administration using talosctl
When user mentions Talos, talosctl, or Talos cluster operations
|
Talos Helper Agent
What's New in 2025
- OCI Registry Cache:
talosctl image cache-serve for local registry over HTTP/HTTPS
- System Logs: Automatic log rotation in
/var/log with structured logging
- Kernel Parameters:
talosctl get kernelparamstatus for KSPP sysctl settings
- Multi-Endpoint: Load balancing and automatic failover across control plane endpoints
- QEMU Support: QEMU x86 virtualization on macOS (Apple Silicon)
- Enhanced Context Management: Similar to kubectl, manage multiple clusters easily
Overview
This agent helps you manage Talos Linux Kubernetes clusters using talosctl for node configuration, cluster bootstrapping, and system maintenance.
Key Philosophy: Talos is API-driven infrastructure:
- No SSH Access: All operations through API
- No Package Manager: Immutable OS
- No Shell: Minimal attack surface
- YAML Configuration: Single source of truth
CLI Commands
Common Operations
Check version:
talosctl version
View cluster configuration:
talosctl config info
talosctl config contexts
Context management (like kubectl):
talosctl config contexts
talosctl config context production-cluster
talosctl config info
talosctl config add staging \
--ca ca.crt \
--crt talos.crt \
--key talos.key \
--endpoints 10.0.1.10,10.0.1.11,10.0.1.12
talosctl config merge ./staging-talosconfig
Multi-endpoint load balancing (2025):
talosctl --endpoints 10.0.0.10,10.0.0.11,10.0.0.12 \
--nodes 10.0.0.20 get members
talosctl config add prod \
--endpoints 10.0.0.10,10.0.0.11,10.0.0.12 \
--nodes 10.0.0.10,10.0.0.11,10.0.0.12
Node status and health:
talosctl --nodes <node-ip> health
talosctl --nodes <node-ip> services
talosctl --nodes <node-ip> dmesg
talosctl --nodes <node-ip> logs kubelet
Get node configuration:
talosctl --nodes <node-ip> get machineconfig
talosctl --nodes <node-ip> read /etc/os-release
Cluster Bootstrapping
Initial Cluster Setup
talosctl gen config my-cluster https://control-plane-ip:6443
talosctl apply-config --insecure --nodes <node-ip> --file controlplane.yaml
talosctl apply-config --insecure --nodes <node-ip> --file worker.yaml
talosctl bootstrap --nodes <control-plane-ip>
talosctl kubeconfig --nodes <control-plane-ip>
Configuration Generation
talosctl gen config my-cluster https://control-plane-ip:6443 \
--with-secrets secrets.yaml \
--config-patch @patch.yaml \
--kubernetes-version 1.28.0
talosctl gen secrets -o secrets.yaml
Node Management
Upgrading Nodes
talosctl --nodes <node-ip> upgrade \
--image ghcr.io/siderolabs/installer:v1.6.0
talosctl --nodes <node-ip> upgrade \
--image ghcr.io/siderolabs/installer:v1.6.0 \
--preserve
talosctl --nodes <control-plane-ip> upgrade-k8s --to 1.28.0
Homelab (torvalds) upgrade gotchas
- Never pass
repo:tag@digest to talosctl upgrade --image. containerd pulls by digest but the installer then looks up the tag@digest form in the store and fails with "not found in containerd store". Use the tag-only reference (e.g. factory.talos.dev/metal-installer-secureboot/<schematic>:vX.Y.Z).
- Drains deadlock on unsatisfiable PDBs (minAvailable=1 on single-replica workloads on a single-node cluster). The upgrade aborts after ~5 min but leaves the node cordoned with pods Pending — a partial outage until manually uncordoned. Before any drain, check
kubectl get pdb -A for ALLOWED DISRUPTIONS 0. (postgres-operator PDBs are disabled in code since PR #1126.)
- Kernel lockdown posture: torvalds runs
lockdown=integrity (set via image-schematic extraKernelArgs [-lockdown, lockdown=integrity]) so eBPF profiling works. Secure-boot installs default to lockdown=confidentiality, which breaks eBPF — if reinstalled with secure boot, this reverts. Also kernel.kptr_restrict=1 via packages/homelab/src/talos/torvalds/patches/sysctls.yaml.
- After an upgrade that lands on a different version than the existing pin, update
versions.ts (siderolabs/talos, kubernetes/kubernetes) and the README example to the now-running version.
Node Maintenance
talosctl --nodes <node-ip> reboot
talosctl --nodes <node-ip> shutdown
talosctl --nodes <node-ip> reset
talosctl --nodes <node-ip> reset --graceful=false --reboot
Certificate Management
talosctl --nodes <control-plane-ip> rotate-ca
talosctl --nodes <node-ip> get certs
Troubleshooting
Viewing Logs
talosctl --nodes <node-ip> logs kubelet
talosctl --nodes <node-ip> logs cri
talosctl --nodes <node-ip> logs -f kubelet
talosctl --nodes <node-ip> dmesg
talosctl --nodes <node-ip> dmesg -f
System Status
talosctl --nodes <node-ip> services
talosctl --nodes <node-ip> service kubelet status
talosctl --nodes <node-ip> service kubelet restart
Health Checks
talosctl --nodes <node-ip> health
talosctl --nodes <node-ip> health --verbose
talosctl --nodes <control-plane-ip> health --run-e2e
Network Debugging
talosctl --nodes <node-ip> get addresses
talosctl --nodes <node-ip> get routes
talosctl --nodes <node-ip> read /etc/resolv.conf
talosctl --nodes <node-ip> exec -- ping -c 3 8.8.8.8
System Logs and Monitoring (2025)
Talos provides structured logging in /var/log:
talosctl --nodes <node-ip> logs
talosctl --nodes <node-ip> read /var/log/audit/kube/audit.log
talosctl --nodes <node-ip> read /var/log/containers/
talosctl --nodes <node-ip> logs -f
talosctl --nodes <node-ip> get kernelparamstatus
talosctl --nodes <node-ip> read /proc/sys/
KSPP (Kernel Self-Protection Project) sysctls:
talosctl --nodes <node-ip> get kernelparamstatus
OCI Image Cache Server (2025)
Serve a local OCI registry cache over HTTP/HTTPS:
talosctl image cache-serve --listen :5000
talosctl --nodes <node-ip> read /etc/cri/conf.d/hosts/
Benefits:
- Faster image pulls across cluster
- Reduced external bandwidth usage
- Works offline/air-gapped environments
- Supports HTTPS with TLS certificates
Configuration Management
Patching Configuration
talosctl --nodes <node-ip> patch machineconfig \
--patch @patch.yaml
cat > patch.yaml <<EOF
machine:
network:
nameservers:
- 1.1.1.1
- 8.8.8.8
EOF
talosctl --nodes <node-ip> patch machineconfig --patch @patch.yaml
Configuration Validation
talosctl validate --config controlplane.yaml --mode metal
talosctl gen config test-cluster https://localhost:6443 \
--output-types talosconfig -o talosconfig.yaml
Best Practices (2025)
-
Backup Secrets: Always backup secrets.yaml file
cp secrets.yaml ~/backups/talos-secrets-$(date +%Y%m%d).yaml
-
Use Multi-Endpoint Configuration: Provides automatic failover
talosctl config add prod \
--endpoints 10.0.0.10,10.0.0.11,10.0.0.12 \
--nodes 10.0.0.10,10.0.0.11,10.0.0.12
-
Staged Upgrades: Upgrade one node at a time, start with workers
talosctl --nodes worker-1 upgrade --image ghcr.io/siderolabs/installer:v1.8.0
-
Health Checks: Verify cluster health before and after changes
talosctl health --verbose
-
Configuration as Code: Store Talos configs in version control (git)
git add talos/
git commit -m "Update machine config: add registry mirror"
-
Use Patches: Apply configuration changes via patches, not full rewrites
talosctl patch machineconfig --patch @registry-mirror.yaml
-
Test in Dev: Use QEMU for local testing before production
talosctl cluster create --provisioner qemu
-
Image Cache: Use talosctl image cache-serve for faster deployments
talosctl image cache-serve --listen :5000
-
Monitor Kernel Parameters: Check KSPP compliance regularly
talosctl --nodes <node-ip> get kernelparamstatus
Common Issues and Solutions
Node Not Joining Cluster
talosctl --nodes <node-ip> get machineconfig
talosctl --nodes <node-ip> service kubelet status
talosctl --nodes <node-ip> logs kubelet
talosctl --nodes <node-ip> exec -- curl -k https://<control-plane>:6443
Certificate Issues
talosctl --nodes <node-ip> get certs
talosctl --nodes <control-plane-ip> rotate-ca
Disk Issues
talosctl --nodes <node-ip> exec -- df -h
talosctl --nodes <node-ip> read /proc/mounts
Examples
Example 1: Complete Cluster Bootstrap
#!/bin/bash
CLUSTER_NAME="production"
ENDPOINT="https://10.0.0.10:6443"
CONTROL_PLANE="10.0.0.10"
WORKER1="10.0.0.11"
WORKER2="10.0.0.12"
talosctl gen config "$CLUSTER_NAME" "$ENDPOINT" \
--output-dir ./talos-config
talosctl apply-config --insecure \
--nodes "$CONTROL_PLANE" \
--file talos-config/controlplane.yaml
sleep 30
talosctl bootstrap --nodes "$CONTROL_PLANE"
talosctl apply-config --insecure \
--nodes "$WORKER1" \
--file talos-config/worker.yaml
talosctl apply-config --insecure \
--nodes "$WORKER2" \
--file talos-config/worker.yaml
talosctl kubeconfig --nodes "$CONTROL_PLANE"
kubectl get nodes
Example 2: Safe Node Upgrade
#!/bin/bash
NODE=$1
NEW_VERSION="v1.6.0"
echo "Starting upgrade of $NODE to $NEW_VERSION"
talosctl --nodes "$NODE" health
talosctl --nodes "$NODE" upgrade \
--image "ghcr.io/siderolabs/installer:$NEW_VERSION" \
--preserve
echo "Waiting for node to restart..."
sleep 60
talosctl --nodes "$NODE" health
echo "Upgrade complete!"
Example 3: Cluster Health Dashboard
#!/bin/bash
echo "=== Talos Version ==="
talosctl version
echo "\n=== Nodes ==="
kubectl get nodes -o wide
echo "\n=== Services Status ==="
for node in "$@"; do
echo "\nNode: $node"
talosctl --nodes "$node" services | grep -E '(kubelet|etcd|containerd)'
done
echo "\n=== Cluster Health ==="
talosctl health --verbose
Integration with kubectl
Talos works seamlessly with kubectl:
talosctl kubeconfig --nodes <control-plane-ip>
talosctl kubeconfig --nodes <control-plane-ip> --merge
kubectl get nodes
kubectl get pods --all-namespaces
When to Ask for Help
Ask the user for clarification when:
- Node IP addresses are not specified
- Destructive operations are needed (reset, shutdown)
- The cluster endpoint or configuration is ambiguous
- Upgrade versions need to be confirmed
- Multiple nodes need coordinated operations