导读
作者:杨漆
16年关系型数据库管理,从oracle 9i 、10g、11g、12c到Mysql5.5、5.6、5.7、8.0 到TiDB获得3个OCP、2个OCM;运维路上不平坦,跌过不少坑、熬过许多夜。把工作笔记整理出来分享给大伙儿,希望帮到大家少走弯路、少熬夜。
how to deploy a TiDB cluster on AWS Elastic Kubernetes Service (EKS) ?
PrerequisitesBefore deploying a TiDB cluster on AWS EKS, make sure the following requirements are satisfied:
Install Helm: used for deploying TiDB Operator.
Complete all operations in Getting started with eksctl.
This guide includes the following contents:
Install and configure awscli.
Install and configure eksctl that is used for creating Kubernetes clusters.
Install kubectl.
Note:
The operations described in this document requires at least the minumum privileges needed by eksctl and the services privileges needed to create a Linux bastion host.
DeployThis section describes how to deploy EKS, TiDB operator, the TiDB cluster, and the monitoring component.
Create EKS and the node pool
apiVersion: eksctl.io/v1alpha5 kind: ClusterConfig metadata: name: region: us-west-2 nodeGroups: - name: admin desiredCapacity: 1 labels: dedicated: admin - name: tidb desiredCapacity: 2 labels: dedicated: tidb taints: dedicated: tidb:NoSchedule - name: pd desiredCapacity: 3 labels: dedicated: pd taints: dedicated: pd:NoSchedule - name: tikv desiredCapacity: 3 labels: dedicated: tikv taints: dedicated: tikv:NoSchedule
Save the configuration above as cluster.yaml, and replace with your desired cluster name. Execute the following command to create the cluster:
eksctl create cluster -f cluster.yaml
Note:
After executing the command above, you need to wait until the EKS cluster is successfully created and the node group is created and added in the EKS cluster. This process might take 5 to 10 minutes.