Talos
Talos Linux is a minimal, immutable operating system designed specifically for running Kubernetes. It provides enhanced security through API-driven configuration with no shell access, automatic updates, and a reduced attack surface. This guide shows you how to use Talos with KSail for local development (Docker provider), cloud deployments (Hetzner Cloud provider), or managed clusters through Sidero Omni (Omni provider).
Talos is ideal for security-focused production workloads, GitOps workflows, and multi-cloud deployments requiring immutable infrastructure. Itâs not suitable for quick prototyping or scenarios requiring shell accessâuse Vanilla or K3s instead.
Quick Start
Section titled âQuick StartâLocal Development with Docker
Section titled âLocal Development with DockerâCreate a Talos cluster on your local machine using Docker containers as nodes.
Prerequisites
Section titled âPrerequisitesâ- Docker Desktop or Docker Engine installed and running
docker pscommand works
Step 1: Initialize Project
Section titled âStep 1: Initialize Projectâksail cluster init \ --name talos-dev \ --distribution Talos \ --provider Docker \ --control-planes 1 \ --workers 2This creates:
ksail.yamlâ KSail configurationtalos/directory â Talos configuration patches
Step 2: Create Cluster
Section titled âStep 2: Create Clusterâksail cluster createKSail downloads the Talos Docker image, creates containers as nodes, bootstraps Kubernetes, configures kubectl context, and installs the configured CNI (Flannel by default; Cilium or Calico can be enabled via ksail.yaml).
Step 3: Verify Cluster
Section titled âStep 3: Verify Clusterâksail cluster infokubectl get nodeskubectl get pods -AStep 4: Cleanup
Section titled âStep 4: Cleanupâksail cluster deleteProduction Deployment on Hetzner Cloud
Section titled âProduction Deployment on Hetzner CloudâCreate a production-ready Talos cluster on Hetzner Cloud infrastructure.
Prerequisites
Section titled âPrerequisitesâ- Hetzner Cloud account
- Hetzner Cloud API token (get it from Hetzner Cloud Console â Project â Security â API Tokens)
- Docker installed locally (for cluster initialization)
Step 1: Configure API Token
Section titled âStep 1: Configure API Tokenâexport HCLOUD_TOKEN=your-hetzner-api-tokenStep 2: Initialize Project
Section titled âStep 2: Initialize Projectâksail cluster init \ --name talos-prod \ --distribution Talos \ --provider Hetzner \ --control-planes 1 \ --workers 2Step 3: Create Cluster
Section titled âStep 3: Create Clusterâksail cluster createKSail creates Hetzner Cloud servers, boots them with Talos, bootstraps Kubernetes, configures kubectl context, and installs CNI, CSI drivers, and the Hetzner Cloud Controller Manager for LoadBalancer support.
Step 4: Verify Cluster
Section titled âStep 4: Verify Clusterâksail cluster infokubectl get nodes -o widekubectl get pods -n kube-system | grep hcloud-csiStep 5: Deploy with LoadBalancer
Section titled âStep 5: Deploy with LoadBalancerâkubectl create deployment web --image=nginx --replicas=3kubectl expose deployment web --port=80 --type=LoadBalancerkubectl get svc web --watchThe LoadBalancer service provisions a real Hetzner Cloud Load Balancer with a public IP.
Step 6: Cleanup
Section titled âStep 6: Cleanupâksail cluster deleteManaged Deployment via Sidero Omni
Section titled âManaged Deployment via Sidero OmniâCreate a Talos cluster managed through Sidero Omni, which handles machine lifecycle and cluster orchestration via a SaaS API.
Prerequisites
Section titled âPrerequisitesâ- A Sidero Omni account
- Omni service account key (create one in the Omni web UI under Settings â Service Accounts)
- Your Omni API endpoint URL (e.g.,
https://<account>.omni.siderolabs.io:443) - Machines already registered in Omni and available for allocation
Step 1: Configure Credentials
Section titled âStep 1: Configure Credentialsâexport OMNI_SERVICE_ACCOUNT_KEY=your-base64-encoded-service-account-keyStep 2: Initialize Project
Section titled âStep 2: Initialize Projectâksail cluster init \ --name talos-omni \ --distribution Talos \ --provider Omni \ --control-planes 1 \ --workers 2Step 3: Add the Omni Endpoint
Section titled âStep 3: Add the Omni EndpointâThe scaffolder does not generate the omni: block automatically. Open ksail.yaml and add spec.cluster.omni.endpoint manually:
spec: cluster: omni: endpoint: "https://<account>.omni.siderolabs.io:443"Step 4: Create Cluster
Section titled âStep 4: Create Clusterâksail cluster createKSail connects to your Omni instance, allocates registered machines, applies Talos configuration patches via the Omni API, bootstraps Kubernetes, and configures kubectl context.
Step 5: Verify Cluster
Section titled âStep 5: Verify Clusterâksail cluster infokubectl get nodeskubectl get pods -AStep 6: Cleanup
Section titled âStep 6: Cleanupâksail cluster deleteUse Cases
Section titled âUse CasesâTalos excels at immutable infrastructure, security-focused production deployments, and multi-environment consistencyâthe same distribution works from local Docker development through Hetzner Cloud production without âworks on my machineâ issues. See Use Cases for practical workflow examples.
Common Talos API operations:
talosctl -n <node-ip> get machineconfig # View configurationtalosctl -n <node-ip> version # Check Talos versiontalosctl -n <node-ip> logs # System logstalosctl -n <node-ip> upgrade --image ghcr.io/siderolabs/installer:v1.6.0Architecture
Section titled âArchitectureâTalos on Docker
Section titled âTalos on DockerâEach node is a Docker container running Talos Linux communicating via a Docker bridge network. No VM overhead. MetalLB provides LoadBalancer services (optional, via --load-balancer Enabled).
Talos on Hetzner
Section titled âTalos on HetznerâEach node is a Hetzner Cloud server running Talos Linux. The Hetzner Cloud Controller Manager provisions load balancers, the Hetzner CSI Driver provisions persistent volumes, and servers have public IPs for external access.
Distribution Comparison
Section titled âDistribution ComparisonâSee the Support Matrix for a full breakdown of feature and component compatibility across all distributions.
Troubleshooting
Section titled âTroubleshootingâCluster Creation Fails
Section titled âCluster Creation FailsâCheck Docker status (docker ps, docker network ls), verify HCLOUD_TOKEN for Hetzner, or try cleaning up and retrying with ksail cluster delete && ksail cluster create.
Nodes Not Ready
Section titled âNodes Not ReadyâCheck CNI pods are running (kubectl get pods -n kube-system and look for your CNI pods, e.g. cilium- or calico-), verify Talos health (talosctl -n <node-ip> health), or reinstall CNI with ksail cluster update.
LoadBalancer Not Working (Docker)
Section titled âLoadBalancer Not Working (Docker)âVerify MetalLB is enabled in ksail.yaml (loadBalancer: Enabled), check MetalLB pods (kubectl get pods -n metallb-system), and verify IP pool exists (kubectl get ipaddresspools -n metallb-system).
Cannot Access Talos API
Section titled âCannot Access Talos APIâCheck ~/.talos/config exists, verify node IPs with kubectl get nodes -o wide, and use explicit node IP with talosctl -n <node-ip> --talosconfig ~/.talos/config get members.
Advanced Topics
Section titled âAdvanced TopicsâCustom Node Counts
Section titled âCustom Node CountsâAdjust control plane and worker nodes in your existing ksail.yaml (requires distribution: Talos):
# Partial snippet â add to your existing ksail.yamlspec: cluster: distribution: Talos talos: controlPlanes: 3 # HA setup workers: 5Persistent Storage (Hetzner)
Section titled âPersistent Storage (Hetzner)âUse Hetzner CSI driver for cloud volumes:
apiVersion: v1kind: PersistentVolumeClaimmetadata: name: data-pvcspec: accessModes: [ReadWriteOnce] storageClassName: hcloud-volumes resources: requests: storage: 10GiTalos Upgrades
Section titled âTalos UpgradesâUpgrade without cluster recreation: talosctl -n <node-ip> upgrade --image ghcr.io/siderolabs/installer:v1.6.0. See Talos upgrade docs for coordination details.
GitOps Integration
Section titled âGitOps IntegrationâEnable Flux or ArgoCD for declarative workload managementâsee GitOps Workflows.