TiDB 版本需要存算分离的版本,部署方法: https://docs.google.com/document/d/11tNIvfdHWTzID3KuZ1lXHii7a1B6d6_XOgB7riFoNK0/edit
(binary可能已经过时,最新binary和部署方法需要咨询 @郭江涛 老师)
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml
helm install kruise openkruise/kruise --version 1.3.0
kubectl create namespace tiflash-autoscale
kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=tiflash-autoscale:default
建议的node规格: "t3.xlarge",固定数目1个。
"tiflash.used-for-autoscale": "true"
建议的node规格: "m6a.2xlarge", node group需要支持auto scale,且一个Compute Pod对应一个node。
"tiflash.used-for-compute": "true"
配置aws region: 用于sns
- name: TIFLASH_AS_ENABLE_SNS # whether to enable sns: default true, if enabled, TIFLASH_AS_REGION should be set
value: "true"
- name: TIFLASH_AS_REGION
value: "us-east-2"
修改autoscale.yaml如下字段到正确的配置
- name: PD_ADDR
value: "172.31.8.1:2379"
- name: TIDB_STATUS_ADDR
value: "172.31.7.1:4000"
因为当前没对接管控交互逻辑,所以当前版本是通过环境变量配置,且当前只能配一个TiDb Cluster的。
接下来会和管控讨论如何对接且支持多Cluster。
kubectl apply -f autoscale.yaml
kubectl describe pod autoscale-0 -n tiflash-autoscale
kubectl logs -f autoscale-0 -n tiflash-autoscale
kubectl delete -f autoscale.yaml && kubectl delete cloneset -n tiflash-autoscale readnode && kubectl delete configmap -n tiflash-autoscale readnode-pod-state
kubectl delete -f autoscale.yaml && kubectl delete cloneset -n tiflash-autoscale readnode && kubectl delete configmap -n tiflash-autoscale readnode-pod-state && sleep 30 && kubectl apply -f autoscale.yaml