Getting Started with 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).
What is Talos?
Section titled âWhat is Talos?âTalos Linux is fundamentally different from traditional Linux distributions:
- Immutable: No package manager, no shell, no SSHâthe OS cannot be modified at runtime
- API-driven: All configuration happens via the Talos API using machine config patches
- Secure by default: Minimal attack surface with only essential services running
- Kubernetes-native: Designed specifically for Kubernetes, not general-purpose computing
- Declarative: Configuration is defined as code and applied atomically
When to Use Talos
Section titled âWhen to Use TalosâTalos is ideal for security-focused production workloads, GitOps workflows, and multi-cloud deployments requiring immutable infrastructure. However, itâs not suitable for quick prototyping (use Vanilla or K3s instead), scenarios requiring shell access or traditional Linux tools, or environments that require Windows/macOS nodes or a general-purpose Linux OS with shell and package management.
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 will:
- Download the Talos Docker image
- Create Docker containers as control plane and worker nodes
- Bootstrap the Kubernetes cluster
- Configure kubectl context
- Install CNI (Cilium by default)
Expected output:
â Creating Talos cluster...â Bootstrapping Kubernetes...â Installing Cilium CNI...â Cluster ready!
Cluster: talos-devNodes: 3 (1 control plane, 2 workers)Provider: DockerStep 3: Verify Cluster
Section titled âStep 3: Verify Clusterâ# Check cluster infoksail cluster info
# View nodeskubectl get nodes
# View all podskubectl get pods -AStep 4: Deploy an Application
Section titled âStep 4: Deploy an Applicationâ# Create a test deploymentkubectl create deployment nginx --image=nginx
# Expose itkubectl expose deployment nginx --port=80 --type=NodePort
# Check the servicekubectl get svc nginxStep 5: Cleanup
Section titled âStep 5: Cleanupâ# Delete the cluster and all resourcesksail 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 2This creates:
ksail.yamlâ KSail configurationtalos/directory â Talos configuration patches
Step 3: Create Cluster
Section titled âStep 3: Create Clusterâksail cluster createKSail will:
- Create Hetzner Cloud servers (control plane + workers)
- Upload Talos ISO to servers
- Boot servers with Talos
- Bootstrap the Kubernetes cluster
- Configure kubectl context
- Install CNI and CSI drivers
- Configure Hetzner Cloud Controller Manager for LoadBalancer support
Expected output:
â Creating Hetzner Cloud servers...â Uploading Talos ISO...â Bootstrapping Kubernetes...â Installing Cilium CNI...â Installing Hetzner CSI...â Cluster ready!
Cluster: talos-prodNodes: 3 (1 control plane, 2 workers)Provider: Hetzner (fsn1-dc14)Step 4: Verify Cluster
Section titled âStep 4: Verify Clusterâ# Check cluster infoksail cluster info
# View nodes with external IPskubectl get nodes -o wide
# Verify CSI driverkubectl get pods -n kube-system | grep hcloud-csiStep 5: Deploy with LoadBalancer
Section titled âStep 5: Deploy with LoadBalancerâ# Create a sample applicationkubectl create deployment web --image=nginx --replicas=3
# Expose with a Hetzner Cloud Load Balancerkubectl expose deployment web --port=80 --type=LoadBalancer
# Wait for external IP (takes ~1-2 minutes)kubectl get svc web --watchThe LoadBalancer service will provision a real Hetzner Cloud Load Balancer with a public IP.
Step 6: Cleanup
Section titled âStep 6: Cleanupâ# Delete the cluster and all Hetzner resourcesksail 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 2This creates:
ksail.yamlâ KSail configurationtalos/directory â Talos configuration patches
Step 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 will:
- Connect to your Omni instance using the service account key
- Allocate registered machines to the cluster
- Apply Talos configuration patches via the Omni API
- Bootstrap the Kubernetes cluster
- Configure kubectl context
Expected output:
â Connecting to Omni...â Allocating machines...â Bootstrapping Kubernetes...â Installing Cilium CNI...â Cluster ready!
Cluster: talos-omniNodes: 3 (1 control plane, 2 workers)Provider: OmniStep 5: Verify Cluster
Section titled âStep 5: Verify Clusterâ# Check cluster infoksail cluster info
# View nodeskubectl get nodes
# View all podskubectl get pods -AStep 6: Cleanup
Section titled âStep 6: Cleanupâ# Delete the cluster (deallocates machines in Omni, does not wipe them)ksail cluster deleteUse Cases
Section titled âUse CasesâTalos excels at immutable infrastructure where all changes happen via declarative configuration patches stored in version controlâmaking configuration drift impossible. Itâs particularly valuable for security-focused production deployments where no SSH access, API-driven operations, and a minimal attack surface are requirements (ideal for compliance-regulated workloads with GitOps tooling like Flux or ArgoCD).
For multi-environment consistency, use the same Talos distribution from local Docker development through production Hetzner Cloud deploymentsâconfiguration patches are portable and behavior is identical across providers, eliminating âworks on my machineâ issues.
Common operations via Talos API:
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âgraph TB
subgraph "Docker Host"
subgraph "Control Plane Container"
ETCD[etcd]
API[kube-apiserver]
SCHED[kube-scheduler]
CM[kube-controller-manager]
KUBELET_CP[kubelet]
end
subgraph "Worker Container 1"
KUBELET_W1[kubelet]
POD1[Pods]
end
subgraph "Worker Container 2"
KUBELET_W2[kubelet]
POD2[Pods]
end
NETWORK[Docker Bridge Network]
API -.->|manages| KUBELET_W1
API -.->|manages| KUBELET_W2
KUBELET_CP -->|runs| POD1
KUBELET_W1 -->|runs| POD1
KUBELET_W2 -->|runs| POD2
NETWORK -.->|connectivity| API
NETWORK -.->|connectivity| KUBELET_W1
NETWORK -.->|connectivity| KUBELET_W2
end
Key characteristics:
- Each node is a Docker container running Talos Linux
- Containers communicate via Docker network
- No VM overheadâdirect container-to-container communication
- MetalLB provides LoadBalancer services (optional, via
--load-balancer Enabled)
Talos on Hetzner
Section titled âTalos on Hetznerâgraph TB
subgraph "Hetzner Cloud"
subgraph "Control Plane Server"
ETCD[etcd]
API[kube-apiserver]
SCHED[kube-scheduler]
CM[kube-controller-manager]
KUBELET_CP[kubelet]
end
subgraph "Worker Server 1"
KUBELET_W1[kubelet]
POD1[Pods]
end
subgraph "Worker Server 2"
KUBELET_W2[kubelet]
POD2[Pods]
end
LB[Hetzner Cloud Load Balancer]
CSI[Hetzner CSI Driver]
CCM[Hetzner Cloud Controller Manager]
API -.->|manages| KUBELET_W1
API -.->|manages| KUBELET_W2
CCM -.->|provisions| LB
CSI -.->|provisions volumes| KUBELET_W1
CSI -.->|provisions volumes| KUBELET_W2
LB -->|routes traffic| POD1
LB -->|routes traffic| POD2
end
USER[Internet Users]
USER -->|https://| LB
Key characteristics:
- Each node is a Hetzner Cloud server running Talos Linux
- Hetzner Cloud Controller Manager provides LoadBalancer support
- Hetzner CSI Driver provides persistent volumes
- Public IPs for external access
Distribution Comparison
Section titled âDistribution Comparisonâ| Feature | Vanilla (Kind) | K3s (K3d) | Talos | VCluster |
|---|---|---|---|---|
| Maturity | Production | Production | Production | Production |
| Setup Time | ~2 min | ~1 min | ~3 min (Docker) | ~1 min |
| Node Weight | Heavy | Light | Medium | Very Light |
| Multi-node | â | â | â | â |
| Shell Access | â | â | â (API-only) | â |
| Immutable OS | â | â | â | N/A |
| Production Ready | â (local) | â ď¸ (edge) | â | â (nested) |
| LoadBalancer Support | Optional | Built-in | Optional/Cloud | Synced |
| Cloud Providers | â | â | â (Hetzner) | â |
| Security Posture | Standard | Standard | â Enhanced | Standard |
| Configuration Style | YAML | YAML | Patches (YAML) | Helm Values |
| Learning Curve | Low | Low | Medium | Medium |
Choose Talos when:
- Security and compliance are priorities
- You want immutable infrastructure
- Youâre deploying to production (Hetzner or other clouds in future)
- You embrace API-driven operations
Choose others when:
- You need shell access for debugging (Vanilla, K3s, VCluster)
- You want the fastest setup (K3s, VCluster)
- Youâre running CI/CD tests (VCluster for isolation)
- You want upstream Kubernetes (Vanilla)
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.
Next Steps
Section titled âNext StepsâExplore KSail Features
Section titled âExplore KSail Featuresâ- GitOps Integration: Bootstrap Flux or ArgoCD
- Secret Management: Encrypt secrets with SOPS
- AI Chat: Interactive cluster management with GitHub Copilot
- VSCode Extension: Manage clusters from your editor
Try Other Distributions
Section titled âTry Other Distributionsâ- Vanilla (Kind): Upstream Kubernetes for maximum compatibility
- K3s (K3d): Lightweight K3s for resource-constrained environments and CI/CD
- VCluster: Virtual clusters for multi-tenancy
Learn More
Section titled âLearn Moreâ- Installation Guide: Install KSail on your system
- CLI Flags: Comprehensive command documentation
- Configuration Reference: Detailed YAML options
- LoadBalancer Configuration: LoadBalancer options for Talos
- Support Matrix: Detailed Talos Ă component compatibility
- Contributing: Contribute to KSail development
Resources
Section titled âResourcesâ- Talos Linux: https://www.talos.dev/
- Talos GitHub: https://github.com/siderolabs/talos
- Hetzner Cloud: https://www.hetzner.com/cloud
- Sidero Omni: https://www.siderolabs.com/platform/saas-for-kubernetes/
- Omni Documentation: https://omni.siderolabs.com/docs/
- MetalLB: https://metallb.universe.tf/
- Talos Configuration Reference: https://www.talos.dev/latest/reference/configuration/