Docker Provider
The Docker provider runs Kubernetes cluster nodes as local Docker containers. It is the default provider for all distributions and is the only external dependency required by KSail â no cloud accounts or remote infrastructure needed.
When to Use the Docker Provider
Section titled âWhen to Use the Docker ProviderâThe Docker provider is ideal when you:
- Develop and test Kubernetes workloads on your local machine
- Want fast cluster creation and teardown cycles (seconds, not minutes)
- Need a consistent local environment that mirrors production cluster structure
- Run CI/CD pipelines that require an ephemeral Kubernetes cluster
Prerequisites
Section titled âPrerequisitesâ- Docker Desktop (macOS / Windows WSL2) or Docker Engine (Linux) â installed and running
- Verify with
docker psâ the command must succeed without errors
Configuration
Section titled âConfigurationâNo additional configuration is needed â Docker is the default provider. If you want to be explicit, set provider: Docker in ksail.yaml:
apiVersion: ksail.io/v1alpha1kind: Clustermetadata: name: my-clusterspec: cluster: distribution: Vanilla # or K3s, Talos, VCluster provider: Docker # default â can be omittedDistribution-Specific Container Labeling
Section titled âDistribution-Specific Container LabelingâThe Docker provider uses different labeling schemes depending on the distribution, so it can identify and manage the correct containers:
| Distribution | Labeling Scheme |
|---|---|
| Vanilla (Kind) | Container name prefix kind- |
| K3s (K3d) | Labels k3d.cluster and k3d.role |
| Talos | Labels talos.cluster.name and talos.type |
| VCluster (Vind) | Name prefixes vcluster.cp., vcluster.node., vcluster.lb. |
You do not need to configure labeling manually â KSail handles it automatically.
Quick Start
Section titled âQuick StartâStep 1: Initialize Project
Section titled âStep 1: Initialize Projectâksail cluster init \ --name my-cluster \ --distribution Vanilla \ --control-planes 1 \ --workers 2This creates ksail.yaml and distribution-specific configuration files.
Step 2: Create Cluster
Section titled âStep 2: Create Clusterâksail cluster createKSail creates Docker containers as Kubernetes nodes, bootstraps the cluster, and configures your kubectl context.
Step 3: Verify Cluster
Section titled âStep 3: Verify Clusterâksail cluster infokubectl get nodeskubectl get pods -AStep 4: Cleanup
Section titled âStep 4: Cleanupâksail cluster deleteArchitecture
Section titled âArchitectureâEach Kubernetes node runs as an isolated Docker container on a shared Docker bridge network. No VMs are involved â container start-up is near-instant.
graph TB
subgraph "Your Machine"
KSAIL["ksail CLI"]
DOCKER["Docker Engine"]
end
subgraph "Docker Containers"
CP["Control Plane Node"]
W1["Worker Node 1"]
W2["Worker Node 2"]
REG["Local Registry (optional)"]
end
KSAIL -->|"create / manage"| DOCKER
DOCKER --> CP
DOCKER --> W1
DOCKER --> W2
DOCKER --> REG
CP -.->|"kubeconfig"| KSAIL
The Docker provider delegates distribution-specific bootstrapping to the appropriate provisioner (Kind, K3d, Talos SDK, or vCluster SDK). KSail never requires you to interact with Docker directly after initial installation.
Operations
Section titled âOperationsâStart / Stop
Section titled âStart / Stopâksail cluster stop # Stop containers without deleting themksail cluster start # Restart stopped containersList Clusters
Section titled âList Clustersâksail cluster listLists all Docker-based clusters managed by KSail across every distribution.
Cluster Info
Section titled âCluster Infoâksail cluster infoDisplays Kubernetes control-plane and core service endpoints for the current context.
LoadBalancer Support
Section titled âLoadBalancer SupportâLoadBalancer behavior depends on the distribution running on Docker:
| Distribution | LoadBalancer Implementation |
|---|---|
| Vanilla (Kind) | cloud-provider-kind (external Docker container) |
| K3s (K3d) | Built-in ServiceLB (Klipper-LB) |
| Talos | MetalLB with default IP pool 172.18.255.200â172.18.255.250 |
| VCluster | Delegated to host cluster |
See LoadBalancer Configuration for details.
Troubleshooting
Section titled âTroubleshootingâCannot connect to the Docker daemon â Docker is not running. Start Docker Desktop or the Docker Engine service (sudo systemctl start docker on Linux).
docker ps returns permission errors â Your user is not in the docker group. Run sudo usermod -aG docker $USER and log out/in, or use sudo for Docker commands.
Cluster creation hangs â Check available system resources. Docker containers need sufficient CPU and memory. See Platform Requirements for minimums.
Port conflicts â Another service is using a port that KSail needs. Stop the conflicting service or delete stale clusters with ksail cluster delete.