_pre_kind_helm
前置条件
创建一个测试 Kubernetes 集群
注意
不建议在生产环境或性能测试中使用 kind
。如有这类需求建议使用公有云托管的 Kubernetes 服务,如 Amazon EKS、Google GKE 或 Azure AKS,或者自行搭建生产级 Kubernetes 集群。
目前有很多方法可以创建一个用于测试的 Kubernetes 集群。在本指南中,我们将使用 kind 来创建一个本地 Kubernetes 集群。如果你想使用已有的 Kubernetes 集群,可以跳过这一步。
这里是一个使用 kind
v0.20.0 的示例:
kind create cluster
预期输出
Creating cluster "kind" ...
✓ Ensuring node image (kindest/node:v1.27.3) 🖼
✓ Preparing nodes 📦
✓ Writing configuration 📜
✓ Starting control-plane 🕹️
✓ Installing CNI 🔌
✓ Installing StorageClass 💾
Set kubectl context to "kind-kind"
You can now use your cluster with:
kubectl cluster-info --context kind-kind
Thanks for using kind! 😊
使用以下命令检查集群的状态:
kubectl cluster-info
预期输出
Kubernetes control plane is running at https://127.0.0.1:60495
CoreDNS is running at https://127.0.0.1:60495/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
备注
中国大陆用户如有网络访问问题,可使用 Greptime 提供的位于阿里云镜像仓库的 kindest/node:v1.27.3
镜像:
kind create cluster --image greptime-registry.cn-hangzhou.cr.aliyuncs.com/kindest/node:v1.27.3
添加 Greptime Helm 仓库
备注
中国大陆用户如有网络访问问题,可跳过这一步骤并直接参考下一步中使用阿里云 OCI 镜像仓库的方式。采用这一方式将无需手动添加 Helm 仓库。
我们提供了 GreptimeDB Operator 和 GreptimeDB 集群的官方 Helm 仓库。你可以通过运行以下命令来添加仓库:
helm repo add greptime https://greptimeteam.github.io/helm-charts/
helm repo update
检查 Greptime Helm 仓库中的 charts:
helm search repo greptime
预期输出
NAME CHART VERSION APP VERSION DESCRIPTION
greptime/greptimedb-cluster 0.2.25 0.9.5 A Helm chart for deploying GreptimeDB cluster i...
greptime/greptimedb-operator 0.2.9 0.1.3-alpha.1 The greptimedb-operator Helm chart for Kubernetes.
greptime/greptimedb-standalone 0.1.27 0.9.5 A Helm chart for deploying standalone greptimedb