Troubleshooting
This guide covers common issues you might encounter when using KSail and how to resolve them.
Cluster Creation Issues
Section titled âCluster Creation IssuesâDocker Connection Failed
Section titled âDocker Connection FailedâSymptom: Error: Cannot connect to the Docker daemon
Solution:
# Verify Docker is runningdocker ps
# If not running, start Docker Desktop or Docker daemon# macOS: Open Docker Desktop application# Linux: sudo systemctl start dockerCluster Creation Hangs
Section titled âCluster Creation HangsâSymptom: ksail cluster create hangs or times out
Possible causes:
- Insufficient resources - Check available RAM and CPU
- Firewall blocking - Ensure Docker network access
- Previous cluster cleanup - Delete old clusters first
Solution:
# Check existing clustersksail cluster list --all
# Delete old clustersksail cluster delete --name <cluster-name>
# Check Docker resourcesdocker system dfdocker system prune # Clean up if neededPort Already in Use
Section titled âPort Already in UseâSymptom: Error: Port 5000 is already allocated or similar
Solution:
# Use a different local registry port by specifying host:port in --local-registryksail cluster init --local-registry http://localhost:5050
# Or find and stop the process using the port# macOS/Linux:lsof -ti:5000 | xargs kill -9
# Windows:netstat -ano | findstr :5000# Then kill the process ID shownGitOps Workflow Issues
Section titled âGitOps Workflow IssuesâImage Push Failed
Section titled âImage Push FailedâSymptom: ksail workload push fails with authentication error
Solution:
# Verify local registry is runningdocker ps | grep registry
# Check registry configuration in ksail.yaml# Ensure authentication is set if using external registryksail cluster init \ --local-registry '${USER}:${TOKEN}@registry.example.com'Flux/ArgoCD Not Reconciling
Section titled âFlux/ArgoCD Not ReconcilingâSymptom: Changes not appearing in cluster after ksail workload reconcile
Solution:
# Check GitOps controller statusksail workload get pods -n flux-system # For Fluxksail workload get pods -n argocd # For ArgoCD
# Check reconciliation logsksail workload logs -n flux-system deployment/source-controllerksail workload logs -n flux-system deployment/kustomize-controller
# Force reconciliationksail workload reconcile --timeout=5mConfiguration Issues
Section titled âConfiguration IssuesâInvalid ksail.yaml
Section titled âInvalid ksail.yamlâSymptom: Error: invalid configuration file
Solution:
# Validate against schema# The schema is available at:# https://github.com/devantler-tech/ksail/blob/main/schemas/ksail-config.schema.json
# Re-initialize with correct valuesksail cluster init --name my-cluster --distribution VanillaEnvironment Variables Not Expanding
Section titled âEnvironment Variables Not ExpandingâSymptom: ${VAR} appears literally in configuration instead of being replaced
Solution:
# Ensure environment variables are set before running ksailexport MY_TOKEN="secret-value"
# Verify variable is setecho $MY_TOKEN
# Use the variable in configurationksail cluster init \ --local-registry '${USER}:${MY_TOKEN}@ghcr.io/myorg/myrepo'Network Issues
Section titled âNetwork IssuesâCNI Installation Failed
Section titled âCNI Installation FailedâSymptom: Pods stuck in ContainerCreating state, CNI-related errors
Solution:
# Check CNI pods are runningksail workload get pods -n kube-system
# For Ciliumksail workload get pods -n kube-system -l k8s-app=cilium
# For Calicoksail workload get pods -n kube-system -l k8s-app=calico-node
# Recreate cluster with specific CNIksail cluster deleteksail cluster init --cni Ciliumksail cluster createHetzner Cloud Issues
Section titled âHetzner Cloud IssuesâHCLOUD_TOKEN Not Working
Section titled âHCLOUD_TOKEN Not WorkingâSymptom: Error: invalid token when creating Talos cluster on Hetzner
Solution:
# Verify token has correct permissions (read/write)# Create token in Hetzner Cloud Console: Security â API Tokens
export HCLOUD_TOKEN="your-token-here"
# Test tokenhcloud server list # If you have hcloud CLI installedTalos ISO Not Found
Section titled âTalos ISO Not FoundâSymptom: Error: ISO not found when creating Talos on Hetzner
Solution:
The default ISO ID may be outdated. Check your Hetzner Cloud project:
- Open Hetzner Cloud Console
- Navigate to your project
- Go to Images â ISOs
- Find the Talos ISO ID
Configure KSail to use the correct ISO ID (implementation-specific - check latest documentation).
Getting More Help
Section titled âGetting More HelpâIf youâre still experiencing issues:
- Check existing issues: GitHub Issues
- Search discussions: GitHub Discussions
- Open a new issue: New Issue
When reporting issues, include:
- KSail version (
ksail --version) - Operating system and architecture
- Docker version (
docker --version) - Relevant configuration (
ksail.yaml) - Complete error messages
- Steps to reproduce