Skip to content

Features

KSail provides a unified CLI for Kubernetes development with built-in support for cluster provisioning (local Docker-based clusters for all distributions, plus Hetzner Cloud for Talos), workload management, GitOps workflows, and secret encryption.

Create and manage local Kubernetes clusters with a single command. KSail supports Vanilla, K3s, Talos, and VCluster distributions, generates native configuration files (kind.yaml, k3d.yaml, Talos patches, vcluster.yaml) that work directly with upstream tools, and automatically configures CNI, CSI, metrics-server, cert-manager, and policy engines. Component installations use automatic retry with exponential backoff for transient failures.

Terminal window
ksail cluster init --name my-cluster --distribution Vanilla --cni Cilium
ksail cluster create

Commands: ksail cluster

CommandDescription
ksail cluster initInitialize a new project
ksail cluster createCreate a cluster
ksail cluster updateUpdate a cluster
ksail cluster deleteDelete a cluster
ksail cluster startStart a stopped cluster
ksail cluster stopStop a running cluster
ksail cluster infoShow cluster information
ksail cluster listList clusters
ksail cluster connectConnect to cluster with K9s
ksail cluster backupBackup cluster resources
ksail cluster restoreRestore cluster resources

Configuration: Declarative Configuration

Deploy and manage Kubernetes workloads using familiar kubectl and Helm patterns. Apply Kustomize directories, Helm charts, or raw YAML; create, edit, delete, and inspect resources; debug with logs, exec, describe, and explain; expose services; export and import container images; and validate manifests against schemas.

Terminal window
ksail workload apply -k k8s/
ksail workload get pods
ksail workload logs deployment/my-app

Commands: ksail workload

CommandDescription
ksail workload applyApply manifests to cluster
ksail workload createCreate resources imperatively
ksail workload getGet resources
ksail workload describeDescribe resources
ksail workload deleteDelete Kubernetes resources
ksail workload editEdit a resource in-place
ksail workload explainGet documentation for a resource type
ksail workload logsView container logs
ksail workload execExecute command in container
ksail workload exposeExpose a resource as a service
ksail workload exportExport container images to tar archive
ksail workload importImport container images from tar archive
ksail workload genGenerate Kubernetes manifests
ksail workload validateValidate manifests against schemas
ksail workload installInstall Helm charts
ksail workload scaleScale deployments
ksail workload rolloutManage rollouts
ksail workload waitWait for conditions
ksail workload imagesList required container images

Enable GitOps with Flux or ArgoCD for declarative, Git-driven deployments. KSail automatically installs the GitOps engine, scaffolds FluxInstance or ArgoCD Application CRs, and provides commands to package manifests as OCI artifacts, push to the local registry, and trigger reconciliation.

Terminal window
ksail cluster init --gitops-engine Flux --local-registry localhost:5050
ksail cluster create
ksail workload push
ksail workload reconcile

Commands:

CommandDescription
ksail workload pushPackage and push manifests to registry
ksail workload reconcileTrigger GitOps sync and wait

Run local OCI registries for faster image pulls, GitOps integration, and isolated development. Support external registries with authentication using format [user:pass@]host[:port][/path] where credentials can use ${ENV_VAR} placeholders.

Terminal window
ksail cluster init --local-registry localhost:5050
ksail cluster create
docker tag my-app localhost:5050/my-app
docker push localhost:5050/my-app

For Docker-based clusters (local Vanilla, K3s, Talos-on-Docker, and VCluster), KSail enables docker.io, ghcr.io, quay.io, and registry.k8s.io mirrors by default to avoid rate limits and improve CI/CD performance. For these clusters, mirror registries run as local pull-through cache containers that authenticate to upstream registries using credentials resolved from ${ENV_VAR} placeholders. Cached images persist across restarts via containerd hosts.toml injection for Vanilla and VCluster, or via K3d registries configuration for K3s and Talos-on-Docker. For Talos clusters on Hetzner, no mirrors are enabled by default. Instead, you can configure externally reachable mirror endpoints via config/flags, which are applied through Talos machine config patches.

Terminal window
# Default mirrors (docker.io, ghcr.io, quay.io, registry.k8s.io)
ksail cluster init
# Add authenticated mirrors (format: [user:pass@]host[=endpoint])
ksail cluster init \
--mirror-registry '${GITHUB_USER}:${GITHUB_TOKEN}@ghcr.io=https://ghcr.io'

Encrypt and decrypt secrets using SOPS with support for age, PGP, and cloud KMS providers.

Terminal window
ksail cipher encrypt secret.yaml
ksail cipher decrypt secret.enc.yaml
ksail cipher edit secret.enc.yaml
ksail cipher import AGE-SECRET-KEY-1...

Commands: ksail cipher

CommandDescription
ksail cipher encryptEncrypt a file with SOPS
ksail cipher decryptDecrypt a SOPS-encrypted file
ksail cipher editEdit encrypted file in-place
ksail cipher importImport age private key

Supported KMS: See Key Management Systems for supported providers and documentation links.

Export cluster resource manifests to a compressed archive and restore them to a target cluster. Backups capture resource YAML in dependency order (CRDs → namespaces → storage → workloads), strip server-assigned metadata for portability, and embed a backup-metadata.json file containing version, timestamp, cluster name, distribution, provider, KSail version, resource count, and resource types. Each restored resource is automatically labeled with ksail.io/backup-name (derived from the archive filename) and ksail.io/restore-name (unique per restore operation) for traceability.

Terminal window
# Backup all namespaces
ksail cluster backup --output ./backup.tar.gz
# Backup specific namespaces and exclude resource types
ksail cluster backup -o ./backup.tar.gz -n default,kube-system --exclude-types events,pods
# Restore, skipping already-existing resources
ksail cluster restore --input ./backup.tar.gz
# Restore, updating existing resources
ksail cluster restore -i ./backup.tar.gz --existing-resource-policy update
# Dry-run: preview what would be restored
ksail cluster restore --input ./backup.tar.gz --dry-run
# Query all resources from a specific backup archive (strip .tar.gz from the filename)
kubectl get all -l ksail.io/backup-name=backup --all-namespaces
# Inspect backup metadata (inside the archive)
tar -xOzf ./backup.tar.gz backup-metadata.json | jq .

Commands: ksail cluster backup, ksail cluster restore

CommandDescription
ksail cluster backupExport resources to a .tar.gz
ksail cluster restoreApply resources from a .tar.gz

Generate Kubernetes resources (Deployment, Service, ConfigMap, Secret, Ingress), Helm releases (HelmRelease CRs), and source resources (OCIRepository, GitRepository, HelmRepository) using built-in generators.

Terminal window
ksail workload gen deployment my-app --image=nginx --port=80
ksail workload gen service my-app --port=80
ksail workload gen helmrelease my-chart --source=oci://registry/chart

Commands: ksail workload gen, ksail workload create

Define cluster configuration in ksail.yaml for team consistency, reproducible environments, and Git-tracked configuration.

ksail.yaml
apiVersion: ksail.io/v1alpha1
kind: Cluster
spec:
cluster:
distribution: Vanilla
cni: Cilium
gitOpsEngine: Flux
localRegistry:
registry: localhost:5050
workload:
sourceDirectory: k8s

Reference: Declarative Configuration

Get interactive help with cluster configuration and troubleshooting using an AI-powered chat session.

Three modes are available:

  • Agent (</>) for full execution with approval
  • Plan (≡) for step-by-step guidance without execution
  • Ask (?) for read-only investigation

Press Tab to cycle between modes. Requires GitHub Copilot CLI installed and authenticated.

Terminal window
ksail chat

Commands: ksail chat

Full Guide: AI Chat Assistant — Detailed mode explanations, keyboard shortcuts, and workflows

Manage KSail clusters directly from Visual Studio Code with cluster sidebar view, interactive wizards for init/create operations, command palette access, keyboard shortcuts (Cmd+Shift+K, then I/C/D), K9s integration, and MCP server provider for AI assistants. Requires KSail CLI and Docker installed; K9s optional for cluster connection.

Terminal window
# Install from VSCode Marketplace
# Search for "KSail" in Extensions view

Installation: See VSCode Extension Installation for setup instructions.

Repository: vsce/

Marketplace: Visual Studio Marketplace

  • Use Cases – Workflows for learning, development, and CI/CD
  • Concepts – Understand the technologies KSail builds upon
  • Configuration – Complete configuration reference