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. Use the global --benchmark flag anywhere in the command chain (for example, ksail --benchmark cluster create or ksail --benchmark cluster update); during cluster create and cluster update it displays per-component install durations (e.g., ✔ flux installed [5.2s]) for performance comparison across runs.

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 switchSwitch active kubeconfig context
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 and GitOps integration. External registries use format [user:pass@]host[:port][/path] with ${ENV_VAR} credential placeholders.

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

Docker-based clusters (Vanilla, K3s, Talos-on-Docker, VCluster) enable docker.io, ghcr.io, quay.io, and registry.k8s.io mirrors by default. These run as local pull-through cache containers with ${ENV_VAR} credential support. Talos on Hetzner requires explicit mirror configuration via flags or ksail.yaml.

Terminal window
ksail cluster init # Default mirrors enabled
# Authenticated mirrors: [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 resources to a compressed archive and restore to any cluster. Backups capture YAML in dependency order (CRDs → namespaces → storage → workloads), strip server metadata, and include a backup-metadata.json file with metadata version, cluster identity (name, distribution, provider, KSail version), timestamp, and resource inventory (count and types). Restored resources receive ksail.io/backup-name and ksail.io/restore-name labels for traceability.

Terminal window
ksail cluster backup --output ./backup.tar.gz
ksail cluster restore --input ./backup.tar.gz
ksail cluster restore -i ./backup.tar.gz --existing-resource-policy update --dry-run

Commands: ksail cluster backup, ksail cluster restore

Generate Kubernetes resources (Deployment, Service, ConfigMap, Secret, Ingress), Helm releases (HelmRelease CRs), and sources (OCIRepository, GitRepository, HelmRepository).

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

Commands: ksail workload gen

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.

Two modes are available:

  • Agent (</>) for full execution with approval
  • Plan (≡) for step-by-step guidance without execution

Press Tab to cycle between modes. Requires an active GitHub Copilot subscription; KSail will prompt you to sign in on first use.

Terminal window
ksail chat

Full Guide: AI Chat Assistant

Manage clusters from Visual Studio Code with the Clusters View, polling-based cluster status view, status bar health indicator, interactive wizards, command palette (Cmd+Shift+K), K9s integration, and MCP server for AI assistants. Requires KSail CLI and Docker; K9s optional.

Marketplace: Visual Studio Marketplace

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