skills/kubeblocks-create-local-k8s-cluster/SKILL.md
Create a local Kubernetes test cluster using Kind, Minikube, or k3d. Handles tool installation, cluster creation, multi-node configuration, and verification. Use when the user needs a local K8s cluster for testing or development, or when they have no existing Kubernetes cluster. NOT for production cluster provisioning (use cloud provider tools like EKS, AKS, GKE) or for installing KubeBlocks (see kubeblocks-install).
npx skillsauth add apecloud/kubeblocks-skills kubeblocks-create-local-k8s-clusterInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create a local Kubernetes cluster for development and testing using Kind, Minikube, or k3d. All three tools run K8s inside Docker containers on the local machine.
Official docs: https://kubeblocks.io/docs/preview/user_docs/references/prepare-a-local-k8s-cluster
| Feature | Kind | Minikube | k3d | |---------|------|----------|-----| | Engine | K8s in Docker | VM or Docker | k3s in Docker | | Multi-node | Yes (via config) | Limited | Yes (via flags) | | Resource usage | Low | Medium | Low | | Startup speed | Fast | Slower | Fast | | Best for | CI/CD, testing | Learning, local dev | Lightweight testing |
Default recommendation: Kind (widely used, lightweight, supports multi-node easily).
- [ ] Step 1: Check Docker is running
- [ ] Step 2: Choose and install a tool
- [ ] Step 3: Create a cluster
- [ ] Step 4: Verify the cluster
All three tools require Docker. Verify it is installed and running:
docker info > /dev/null 2>&1
If Docker is not available, tell the user to install it first:
Ask the user which tool they prefer. If no preference, default to Kind.
# macOS
brew install kind
# Linux (amd64)
[ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.24.0/kind-linux-amd64
chmod +x ./kind && sudo mv ./kind /usr/local/bin/kind
# Linux (arm64)
[ $(uname -m) = aarch64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.24.0/kind-linux-arm64
chmod +x ./kind && sudo mv ./kind /usr/local/bin/kind
# Windows
choco install kind
# macOS
brew install minikube
# Linux (rpm-based)
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-latest.x86_64.rpm
sudo rpm -Uvh minikube-latest.x86_64.rpm
# Linux (deb-based)
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb
sudo dpkg -i minikube_latest_amd64.deb
# Windows
choco install minikube
# macOS
brew install k3d
# Linux
curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash
# Windows
choco install k3d
Single-node cluster (simplest):
kind create cluster --name kb-test
Multi-node cluster (recommended for KubeBlocks):
Create a config file kind-config.yaml:
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker
Then create the cluster:
kind create cluster --name kb-test --config kind-config.yaml
# Single-node (default)
minikube start
# With Docker driver (recommended)
minikube start --driver=docker
# With more resources
minikube start --driver=docker --cpus=4 --memory=8192
# Single-node
k3d cluster create kb-test
# Multi-node (1 server + 2 agents)
k3d cluster create kb-test --servers 1 --agents 2
kubectl get nodes
Expected output (Kind multi-node example):
NAME STATUS ROLES AGE VERSION
kb-test-control-plane Ready control-plane 30s v1.31.0
kb-test-worker Ready <none> 20s v1.31.0
kb-test-worker2 Ready <none> 20s v1.31.0
Also verify kubectl context is set correctly:
kubectl config current-context
When the cluster is no longer needed:
# Kind
kind delete cluster --name kb-test
# Minikube
minikube delete
# k3d
k3d cluster delete kb-test
Once the cluster is running, you can install KubeBlocks using the install-kubeblocks skill.
devops
Expand persistent volume storage for KubeBlocks database clusters via OpsRequest. Requires the StorageClass to support volume expansion (allowVolumeExpansion=true). Use when the user needs more disk space, wants to increase storage, expand volumes, or resize PVCs. NOT for changing CPU/memory (see vertical-scaling) or adding more replicas (see horizontal-scaling). Note that volume shrinking is not supported by Kubernetes.
data-ai
Scale CPU and memory resources for KubeBlocks database clusters via OpsRequest (vertical scaling). Supports in-place updates when the feature gate is enabled. Use when the user wants to change, increase, decrease, resize, or adjust CPU or memory resources of a database cluster. NOT for adding/removing replicas or shards (see horizontal-scaling) or expanding disk storage (see volume-expansion).
data-ai
Upgrade the KubeBlocks operator itself via Helm. Covers update operator, upgrade to v1.0, update kubeblocks version, and CRD updates. Use when the user wants to upgrade KubeBlocks, update the operator, or upgrade to a new KubeBlocks release. NOT for upgrading database engine versions (see minor-version-upgrade).
development
Diagnostic guide for KubeBlocks-managed database clusters. Use when the user reports troubleshoot, debug, diagnose, not working, error, failed, stuck, CrashLoopBackOff, cluster exception, or similar problems with their database cluster. This skill guides the agent through diagnostic steps — it does NOT perform actions.