kubekanvas setup-k3d
Create a local k3d Kubernetes cluster for development and testing. k3d runs lightweight k3s Kubernetes clusters inside Docker containers, making it ideal for local development with the KubeKanvas visual IDE.
Usage
kubekanvas setup-k3d [options]Options
| Flag | Description | Default |
|---|---|---|
-n, --name <name> | Name of the k3d cluster to create | kubekanvas |
Prerequisites
- Docker must be installed and running
What It Does
- Verifies Docker: Checks that Docker is installed and the daemon is running
- Installs k3d: If not present, installs k3d automatically (Homebrew on macOS, wget on Linux)
- Installs kubectl: Ensures kubectl is available for cluster management
- Creates cluster: Runs
k3d cluster create {name}to bootstrap a Kubernetes cluster inside Docker - Configures kubeconfig: The new cluster is automatically added to your kubeconfig and ready for immediate use
Examples
kubekanvas setup-k3dkubekanvas setup-k3d --name my-dev-clusterExample Output
$ kubekanvas setup-k3d --name dev
š³ Docker is running
š Checking k3d...
ā
k3d is installed
š Creating k3d cluster "dev"...
INFO[0000] Creating cluster "dev"
INFO[0015] Cluster "dev" created successfully!
ā
Kubernetes cluster "dev" is ready!
Run "kubekanvas configure" to register it with KubeKanvas.After Setup
Once the cluster is created, register it with KubeKanvas:
kubekanvas configure
kubekanvas connectTip: k3d clusters are ephemeral. You can delete them with k3d cluster delete {name} and recreate them at any time. This makes them perfect for testing Kubernetes deployments designed in the KubeKanvas IDE.
Platform Support
| Platform | k3d Install Method |
|---|---|
| macOS | Homebrew |
| Linux | wget from official releases |
| Windows | Not supported (use WSL2 with Docker Desktop) |