ksail-go

command module
v1.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

README ΒΆ

Go Reference codecov CI - Go

ksail

[!IMPORTANT] This is a work in progress to migrate KSail to a Golang. This is a huge endeavour, but being able to leverage the power of the Go ecosystem will be invaluable. The amount of packages available in Go to support this project is immense, so switching programming language has the potential to greatly enhance the functionality, performance and ease of use of KSail. I also hope switching will promote adoption and contributions.

KSail is a CLI tool with the ambition to become a full-fledged SDK for creating and maintaining Kubernetes clustersβ€”locally or in the cloud. It provides a unified interface for managing clusters and workloads across different distributions (currently Kind and K3d, with more planned). By wrapping existing tools with a consistent command-line experience, KSail eliminates the complexity of juggling multiple CLIs and learning different syntaxes for each distribution.

KSail simplifies your Kubernetes workflow by providing:

  • 🎯 A single command-line interface for Kind and K3d clusters
  • πŸ“ Declarative configuration for reproducible environments
  • πŸ” Integrated workload and secrets management
  • ⚑ Fast cluster lifecycle operations (create, start, stop, delete)

Whether you're developing applications, testing infrastructure changes, or learning Kubernetes, KSail gets you from zero to a working cluster in seconds.

🌟 Declarative. Local. Effortless. Welcome to Kubernetes, simplified.

Getting Started πŸš€

Prerequisites βœ…

System Requirements:

  • 🐧 Linux (amd64 and arm64)
  • 🍎 MacOS (amd64 and arm64)
  • 🐳 Docker (required for Kind and K3d clusters)
Installation πŸ“¦
Homebrew 🍺
Go Install πŸ”§
go install github.com/devantler-tech/ksail-go@latest
ksail --help
From Source πŸ’»
git clone https://github.com/devantler-tech/ksail-go.git
go build -o ksail
./ksail --help

Usage βš™οΈ

Get a Kubernetes cluster running in seconds:

# Initialize a new project with Kind
ksail cluster init --distribution Kind

# Create and start the cluster
ksail cluster create

# Deploy your workloads
ksail workload reconcile

# Clean up when done
ksail cluster delete

Documentation πŸ“š

For Contributors πŸ‘₯
For Users πŸ“–

For detailed command reference, run ksail --help or ksail <command> --help.

Presentations 🎀

Star History ⭐


Contributions welcome. Open an issue or PR to propose features.

For information on how to contribute, see CONTRIBUTING.md.

Documentation ΒΆ

Overview ΒΆ

Package main is the entry point for the KSail application.

Directories ΒΆ

Path Synopsis
cmd
Package cmd provides the command-line interface for KSail.
Package cmd provides the command-line interface for KSail.
cipher
Package cipher provides the cipher command for integrating with SOPS.
Package cipher provides the cipher command for integrating with SOPS.
cluster
Package cluster groups all KSail cluster lifecycle Cobra commands under a single namespace.
Package cluster groups all KSail cluster lifecycle Cobra commands under a single namespace.
workload
Package workload provides the workload command namespace.
Package workload provides the workload command namespace.
internal
shared
Package shared provides reusable helpers for command wiring.
Package shared provides reusable helpers for command wiring.
testutils
Package testutils provides testing utilities to aid error handling in tests.
Package testutils provides testing utilities to aid error handling in tests.
pkg
apis/cluster/v1alpha1
Package v1alpha1 provides model definitions for a KSail cluster.
Package v1alpha1 provides model definitions for a KSail cluster.
client/docker
Package docker provides client wrappers for Docker Engine API operations.
Package docker provides client wrappers for Docker Engine API operations.
client/helm
Package helm provides helpers for interacting with Helm in KSail.
Package helm provides helpers for interacting with Helm in KSail.
client/k9s
Package k9s provides a k9s client implementation.
Package k9s provides a k9s client implementation.
client/kubectl
Package kubectl provides a kubectl client implementation.
Package kubectl provides a kubectl client implementation.
client/sops
Package sops provides a sops client implementation that delegates to the sops binary.
Package sops provides a sops client implementation that delegates to the sops binary.
di
Package di exposes shared dependency injection helpers for KSail commands.
Package di exposes shared dependency injection helpers for KSail commands.
io
Package io provides utilities for input and output operations.
Package io provides utilities for input and output operations.
io/config-manager
Package configmanager provides centralized configuration management using Viper.
Package configmanager provides centralized configuration management using Viper.
io/config-manager/helpers
Package helpers provides common functionality for config managers to eliminate duplication.
Package helpers provides common functionality for config managers to eliminate duplication.
io/config-manager/k3d
Package k3d provides configuration management for K3d v1alpha5.SimpleConfig configurations.
Package k3d provides configuration management for K3d v1alpha5.SimpleConfig configurations.
io/config-manager/kind
Package kind provides configuration management for Kind cluster configurations.
Package kind provides configuration management for Kind cluster configurations.
io/config-manager/ksail
Package configmanager provides configuration management for KSail v1alpha1.Cluster configurations.
Package configmanager provides configuration management for KSail v1alpha1.Cluster configurations.
io/config-manager/testutils
Package testutils provides common test utilities for config manager testing.
Package testutils provides common test utilities for config manager testing.
io/generator
Package generator provides an interface for generating files from code.
Package generator provides an interface for generating files from code.
io/generator/k3d
Package k3dgenerator provides utilities for generating k3d cluster configurations.
Package k3dgenerator provides utilities for generating k3d cluster configurations.
io/generator/kind
Package kindgenerator provides utilities for generating kind cluster configurations.
Package kindgenerator provides utilities for generating kind cluster configurations.
io/generator/kustomization
Package kustomizationgenerator provides utilities for generating kustomization.yaml files.
Package kustomizationgenerator provides utilities for generating kustomization.yaml files.
io/generator/testutils
Package testutils provides generator-specific test utilities.
Package testutils provides generator-specific test utilities.
io/generator/yaml
Package yamlgenerator provides YAML generation functionality for arbitrary models.
Package yamlgenerator provides YAML generation functionality for arbitrary models.
io/marshaller
Package marshaller provides functionality for marshaling and unmarshaling resources.
Package marshaller provides functionality for marshaling and unmarshaling resources.
io/marshaller/yaml
Package yamlmarshaller provides functionality for marshaling and unmarshaling YAML documents.
Package yamlmarshaller provides functionality for marshaling and unmarshaling YAML documents.
io/scaffolder
Package scaffolder provides utilities for scaffolding KSail project files and configuration.
Package scaffolder provides utilities for scaffolding KSail project files and configuration.
io/validator
Package validator provides interfaces for configuration file validation.
Package validator provides interfaces for configuration file validation.
io/validator/k3d
Package k3d provides K3d configuration validation functionality.
Package k3d provides K3d configuration validation functionality.
io/validator/kind
Package kind provides Kind configuration validation functionality.
Package kind provides Kind configuration validation functionality.
io/validator/ksail
Package ksail provides validation for KSail cluster configurations.
Package ksail provides validation for KSail cluster configurations.
io/validator/metadata
Package metadata provides shared metadata validation utilities used across multiple validators.
Package metadata provides shared metadata validation utilities used across multiple validators.
io/validator/testutils
Package testutils provides common test utilities for validator tests to eliminate duplication.
Package testutils provides common test utilities for validator tests to eliminate duplication.
svc/commandrunner
Package commandrunner provides helpers for executing Cobra commands while capturing their output and displaying it to the console.
Package commandrunner provides helpers for executing Cobra commands while capturing their output and displaying it to the console.
svc/installer
Package installer provides functionality for installing and uninstalling components.
Package installer provides functionality for installing and uninstalling components.
svc/installer/applyset
Package applysetinstaller provides an installer for managing ApplySet CRD and CR on a Kubernetes cluster.
Package applysetinstaller provides an installer for managing ApplySet CRD and CR on a Kubernetes cluster.
svc/installer/argocd
Package argocdinstaller provides an installer for installing ArgoCD on a Kubernetes cluster.
Package argocdinstaller provides an installer for installing ArgoCD on a Kubernetes cluster.
svc/installer/cilium
Package ciliuminstaller provides an installer for installing Cilium CNI on a Kubernetes cluster.
Package ciliuminstaller provides an installer for installing Cilium CNI on a Kubernetes cluster.
svc/installer/flux
Package fluxinstaller provides an installer for installing flux on a Kubernetes cluster.
Package fluxinstaller provides an installer for installing flux on a Kubernetes cluster.
svc/installer/istio
Package istioinstaller provides an installer for installing Istio service mesh on a Kubernetes cluster.
Package istioinstaller provides an installer for installing Istio service mesh on a Kubernetes cluster.
svc/installer/metrics-server
Package metricsserverinstaller provides an installer for installing metrics-server on a Kubernetes cluster.
Package metricsserverinstaller provides an installer for installing metrics-server on a Kubernetes cluster.
svc/installer/testutils
Package testutils provides common test utilities for installer packages
Package testutils provides common test utilities for installer packages
svc/installer/traefik
Package traefikinstaller provides an installer for installing Traefik on a Kubernetes cluster.
Package traefikinstaller provides an installer for installing Traefik on a Kubernetes cluster.
svc/provisioner/cluster
Package clusterprovisioner provides implementations of the Provisioner interface for provisioning clusters in different providers.
Package clusterprovisioner provides implementations of the Provisioner interface for provisioning clusters in different providers.
svc/provisioner/cluster/k3d
Package k3dprovisioner contains the K3d cluster provisioner and its client provider interfaces.
Package k3dprovisioner contains the K3d cluster provisioner and its client provider interfaces.
svc/provisioner/cluster/kind
Package kindprovisioner provides implementations of the Provisioner interface for provisioning clusters in different providers.
Package kindprovisioner provides implementations of the Provisioner interface for provisioning clusters in different providers.
svc/provisioner/cluster/registries
Package registries contains helpers for managing shared mirror registry state across different provisioners.
Package registries contains helpers for managing shared mirror registry state across different provisioners.
svc/provisioner/cluster/testutils
Package clustertestutils provides common test utilities for cluster provisioner testing, including shared test cases and helper functions for standardizing test patterns.
Package clustertestutils provides common test utilities for cluster provisioner testing, including shared test cases and helper functions for standardizing test patterns.
ui/asciiart
Package asciiart provides ASCII art printing functionality for KSail.
Package asciiart provides ASCII art printing functionality for KSail.
ui/error-handler
Package errorhandler centralizes Cobra command execution with KSail's error formatting rules.
Package errorhandler centralizes Cobra command execution with KSail's error formatting rules.
ui/notify
Package notify provides utilities for sending notifications to the user.
Package notify provides utilities for sending notifications to the user.
ui/timer
Package timer provides timing functionality for tracking command execution duration.
Package timer provides timing functionality for tracking command execution duration.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL