Before you start
Create a Kubernetes cluster using KindCreate a Kubernetes cluster using MinikubeCreate a Kubernetes cluster using k3d
Create a test Kubernetes cluster
This tutorial introduces how to create a local Kubernetes test cluster using Minikube, K3d, and Kind. These tools make it easy to try out KubeBlocks on your local host, offering a great solution for development, testing, and experimentation without the complexity of creating a full production- grade cluster.
Before you start
Make sure you have the following tools installed on your local host:
- Docker: All three tools rely on Docker to create containerized Kubernetes clusters.- kubectl: The Kubernetes command-line tool for interacting with clusters. Refer to the kubectl installation guide
KIND
Create a Kubernetes cluster using Kind
Kind stands for Kubernetes IN Docker. It runs Kubernetes clusters within Docker containers, making it an ideal tool for local Kubernetes testing.
- Install Kind. For details, you can refer to Kind Quick Start.
MACOS LINUX
brew install kind
kind create cluster - - name mykindcluster
This command creates a single- node Kubernetes cluster running in a Docker container.
- Check whether the cluster is started and running.
kubectl get nodesNAME STATUS ROLES AGE VERSIONmykindcluster- control- plane Ready control- plane 25s v1.31.0
You can see a node named mykindcluster- control- plane from the output, which means the cluster is created successfully.
- (Optional) Configure a cluster with multiple nodes.
Kind also supports clusters with multiple nodes. You can create a multi- node cluster by a configuration file.
kind: ClusterapiVersion: kind. $x$ - k8s.io/v1alpha4nodes:role: control- planerole: workerrole: worker
Use the configuration file to create a multi- node cluster.
kind create cluster - - name multinode- cluster - - config kind- config.yaml
- If you want to delete the Kind cluster, run the command below.
kind delete cluster - - name mykindcluster