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.
Cluster Provisioning
Section titled âCluster ProvisioningâCreate and manage local Kubernetes clusters with a single command. KSail supports multiple distributions and automatically configures networking, storage, and observability components.
ksail cluster init --name my-cluster --distribution Vanilla --cni Ciliumksail cluster createCapabilities:
- Multi-distribution support â Vanilla, K3s, and Talos distributions
- Component installation â CNI (Cilium, Calico), CSI, metrics-server with kubelet-csr-approver, cert-manager, and policy engines
- Custom cluster naming â Set container, registry, and context names via
--name - Node configuration â Control-plane and worker node counts via
--control-planesand--workers - Connection management â Automatic kubeconfig and context configuration
Commands: ksail cluster
| Command | Description |
|---|---|
ksail cluster init | Initialize a new project |
ksail cluster create | Create a cluster |
ksail cluster delete | Delete a cluster |
ksail cluster start | Start a stopped cluster |
ksail cluster stop | Stop a running cluster |
ksail cluster info | Show cluster information |
ksail cluster list | List clusters |
ksail cluster connect | Connect to cluster with K9s |
Configuration: Declarative Configuration
Workload Management
Section titled âWorkload ManagementâDeploy and manage Kubernetes workloads using familiar kubectl and Helm patterns wrapped in consistent commands.
ksail workload apply -k k8s/ksail workload get podsksail workload logs deployment/my-appCapabilities:
- Apply manifests â Kustomize directories, Helm charts, or raw YAML
- Generate resources â Create deployments, services, secrets, and more
- Debug workloads â Logs, exec, describe, and explain commands
- Validate manifests â Schema validation before applying
Commands: ksail workload
| Command | Description |
|---|---|
ksail workload apply | Apply manifests to cluster |
ksail workload get | Get resources |
ksail workload describe | Describe resources |
ksail workload logs | View container logs |
ksail workload exec | Execute command in container |
ksail workload gen | Generate Kubernetes manifests |
ksail workload validate | Validate manifests against schemas |
ksail workload install | Install Helm charts |
ksail workload scale | Scale deployments |
ksail workload rollout | Manage rollouts |
ksail workload wait | Wait for conditions |
GitOps Workflows
Section titled âGitOps WorkflowsâEnable GitOps with Flux or ArgoCD for declarative, Git-driven deployments. KSail scaffolds the required CRs and provides commands for pushing and reconciling workloads.
ksail cluster init --gitops-engine Flux --local-registryksail cluster createksail workload pushksail workload reconcileCapabilities:
- Engine installation â Automatic Flux or ArgoCD setup
- CR scaffolding â FluxInstance or ArgoCD Application generated automatically
- OCI artifact packaging â Package manifests and push to local registry
- Reconciliation triggers â Force sync and wait for completion
Workflow:
- Initialize with GitOps engine and local registry enabled
- Create cluster (installs GitOps controllers)
- Edit manifests in source directory
- Push manifests as OCI artifact
- Trigger reconciliation
Commands:
| Command | Description |
|---|---|
ksail workload push | Package and push manifests to registry |
ksail workload reconcile | Trigger GitOps sync and wait |
Registry Management
Section titled âRegistry ManagementâRun local OCI registries for faster development cycles, configure mirror registries to avoid rate limits, or use external registries with authentication.
Local Registry
Section titled âLocal Registryâksail cluster init --local-registry --local-registry-port 5050ksail cluster create
docker tag my-app localhost:5050/my-appdocker push localhost:5050/my-appBenefits: Faster image pulls, GitOps integration, isolated development
With authentication (for external registries):
ksail cluster init \ --local-registry '${GITHUB_USER}:${GITHUB_TOKEN}@ghcr.io/myorg/myrepo'Format: [user:pass@]host[:port][/path]
Mirror Registries
Section titled âMirror Registriesâ# Mirrors are enabled by default (docker.io and ghcr.io)ksail cluster init
# Add additional mirrorsksail cluster init \ --mirror-registry gcr.io=https://gcr.ioBenefits: Avoid Docker Hub rate limits, offline development, faster CI/CD
With authentication:
# Using GitHub Container Registryexport GITHUB_USER=your-usernameexport GITHUB_TOKEN=ghp_yourtoken
ksail cluster init \ --mirror-registry '${GITHUB_USER}:${GITHUB_TOKEN}@ghcr.io=https://ghcr.io'
# Using Docker Hub to avoid rate limitsexport DOCKER_USER=your-usernameexport DOCKER_TOKEN=your-token
ksail cluster init \ --mirror-registry '${DOCKER_USER}:${DOCKER_TOKEN}@docker.io=https://registry-1.docker.io'Format: [user:pass@]host[=endpoint]
How it works:
- KSail creates a local pull-through cache registry container for each mirror
- Credentials are resolved from environment variables at runtime
- The registry authenticates to the upstream using
REGISTRY_PROXY_USERNAMEandREGISTRY_PROXY_PASSWORD - Images are pulled through the authenticated mirror, avoiding rate limits
- Cached images persist across cluster restarts for faster subsequent pulls
Secret Management
Section titled âSecret ManagementâEncrypt and decrypt secrets using SOPS with support for age, PGP, and cloud KMS providers.
ksail cipher encrypt secret.yamlksail cipher decrypt secret.enc.yamlksail cipher edit secret.enc.yamlksail cipher import AGE-SECRET-KEY-1...Commands: ksail cipher
| Command | Description |
|---|---|
ksail cipher encrypt | Encrypt a file with SOPS |
ksail cipher decrypt | Decrypt a SOPS-encrypted file |
ksail cipher edit | Edit encrypted file in-place |
ksail cipher import | Import age private key |
Supported KMS: See Key Management Systems for supported providers and documentation links.
Code Generation
Section titled âCode GenerationâGenerate Kubernetes manifests, Helm releases, and Flux/ArgoCD resources using built-in generators.
ksail workload gen deployment my-app --image=nginx --port=80ksail workload gen service my-app --port=80ksail workload gen helmrelease my-chart --source=oci://registry/chartCapabilities:
- Kubernetes resources â Deployments, services, configmaps, secrets, ingress, and more
- Helm releases â HelmRelease CRs for Flux
- Source resources â OCIRepository, GitRepository, HelmRepository
Commands: ksail workload gen, ksail workload create
Declarative Configuration
Section titled âDeclarative ConfigurationâDefine cluster configuration in ksail.yaml for reproducible, version-controlled environments.
apiVersion: ksail.io/v1alpha1kind: Clusterspec: cluster: distribution: Vanilla cni: Cilium gitOpsEngine: Flux localRegistry: Enabled workload: sourceDirectory: k8sBenefits: Team consistency, reproducible environments, Git-tracked configuration
Reference: Declarative Configuration
AI Chat Assistant
Section titled âAI Chat AssistantâGet interactive help with cluster configuration and troubleshooting using an AI-powered chat session.
ksail chatCapabilities:
- Guided configuration â Get recommendations for distributions, CNI, and other settings
- Troubleshooting â Diagnose cluster issues with AI assistance
- Command execution â Run KSail commands with your approval
- Context-aware â Understands your ksail.yaml and project structure
Prerequisites: Requires GitHub Copilot CLI installed and authenticated.
Commands: ksail chat
VSCode Extension
Section titled âVSCode ExtensionâManage KSail clusters directly from Visual Studio Code with an integrated extension that provides cluster management, interactive wizards, and AI assistant integration.
# Install from VSCode Marketplace# Search for "KSail" in Extensions viewCapabilities:
- Clusters sidebar view â View and manage clusters with status indicators (running/stopped)
- Interactive wizards â Step-by-step configuration for cluster init and create operations
- Command palette â Full access to all cluster lifecycle commands
- Keyboard shortcuts â Quick access to common operations (
Cmd+Shift+Kprefix) - Smart context menus â Right-click actions based on cluster state
- MCP server provider â Exposes KSail as an MCP server for AI assistants
Features:
| Feature | Description |
|---|---|
| Cluster tree view | Shows all clusters with provider and status info |
| Init wizard | Multi-step configuration for new clusters |
| Create wizard | Guided cluster creation with component selection |
| Command shortcuts | Cmd+Shift+K I (init), C (create), D (delete) |
| K9s integration | Open cluster in K9s terminal UI |
| MCP integration | Use KSail with Copilot and other AI tools |
Prerequisites:
- KSail CLI installed and in PATH
- Docker running (for cluster operations)
- K9s (optional, for cluster connection)
Installation: See VSCode Extension Installation for setup instructions.
Repository: vsce/
Marketplace: Visual Studio Marketplace
Next Steps
Section titled âNext Stepsâ- Use Cases â Workflows for learning, development, and CI/CD
- Concepts â Understand the technologies KSail builds upon
- Configuration â Complete configuration reference