From 61d50aa28eac53ff497b4c0d119f323b0502a354 Mon Sep 17 00:00:00 2001 From: xjiaqing Date: Sun, 14 Jan 2024 17:38:45 +0800 Subject: [PATCH 1/3] fix install the ebs-csi-driver addon --- en/deploy-on-aws-eks.md | 32 +++++++++++++++++++++++++++++--- zh/deploy-on-aws-eks.md | 32 +++++++++++++++++++++++++++++--- 2 files changed, 58 insertions(+), 6 deletions(-) diff --git a/en/deploy-on-aws-eks.md b/en/deploy-on-aws-eks.md index 6cfded020..0883b6e19 100644 --- a/en/deploy-on-aws-eks.md +++ b/en/deploy-on-aws-eks.md @@ -54,6 +54,8 @@ kind: ClusterConfig metadata: name: ${clusterName} region: ap-northeast-1 +addons: + - name: aws-ebs-csi-driver nodeGroups: - name: admin @@ -61,7 +63,9 @@ nodeGroups: privateNetworking: true labels: dedicated: admin - + iam: + withAddonPolicies: + ebs: true - name: tidb-1a desiredCapacity: 1 privateNetworking: true @@ -71,6 +75,9 @@ nodeGroups: dedicated: tidb taints: dedicated: tidb:NoSchedule + iam: + withAddonPolicies: + ebs: true - name: tidb-1d desiredCapacity: 0 privateNetworking: true @@ -80,6 +87,9 @@ nodeGroups: dedicated: tidb taints: dedicated: tidb:NoSchedule + iam: + withAddonPolicies: + ebs: true - name: tidb-1c desiredCapacity: 1 privateNetworking: true @@ -89,7 +99,9 @@ nodeGroups: dedicated: tidb taints: dedicated: tidb:NoSchedule - + iam: + withAddonPolicies: + ebs: true - name: pd-1a desiredCapacity: 1 privateNetworking: true @@ -99,6 +111,9 @@ nodeGroups: dedicated: pd taints: dedicated: pd:NoSchedule + iam: + withAddonPolicies: + ebs: true - name: pd-1d desiredCapacity: 1 privateNetworking: true @@ -108,6 +123,9 @@ nodeGroups: dedicated: pd taints: dedicated: pd:NoSchedule + iam: + withAddonPolicies: + ebs: true - name: pd-1c desiredCapacity: 1 privateNetworking: true @@ -117,7 +135,9 @@ nodeGroups: dedicated: pd taints: dedicated: pd:NoSchedule - + iam: + withAddonPolicies: + ebs: true - name: tikv-1a desiredCapacity: 1 privateNetworking: true @@ -127,6 +147,9 @@ nodeGroups: dedicated: tikv taints: dedicated: tikv:NoSchedule + iam: + withAddonPolicies: + ebs: true - name: tikv-1d desiredCapacity: 1 privateNetworking: true @@ -145,6 +168,9 @@ nodeGroups: dedicated: tikv taints: dedicated: tikv:NoSchedule + iam: + withAddonPolicies: + ebs: true ``` By default, only two TiDB nodes are required, so you can set the `desiredCapacity` of the `tidb-1d` node group to `0`. You can scale out this node group any time if necessary. diff --git a/zh/deploy-on-aws-eks.md b/zh/deploy-on-aws-eks.md index 499bb9745..a25f25be6 100644 --- a/zh/deploy-on-aws-eks.md +++ b/zh/deploy-on-aws-eks.md @@ -55,6 +55,8 @@ kind: ClusterConfig metadata: name: ${clusterName} region: ap-northeast-1 +addons: + - name: aws-ebs-csi-driver nodeGroups: - name: admin @@ -62,7 +64,9 @@ nodeGroups: privateNetworking: true labels: dedicated: admin - + iam: + withAddonPolicies: + ebs: true - name: tidb-1a desiredCapacity: 1 privateNetworking: true @@ -72,6 +76,9 @@ nodeGroups: dedicated: tidb taints: dedicated: tidb:NoSchedule + iam: + withAddonPolicies: + ebs: true - name: tidb-1d desiredCapacity: 0 privateNetworking: true @@ -81,6 +88,9 @@ nodeGroups: dedicated: tidb taints: dedicated: tidb:NoSchedule + iam: + withAddonPolicies: + ebs: true - name: tidb-1c desiredCapacity: 1 privateNetworking: true @@ -90,7 +100,9 @@ nodeGroups: dedicated: tidb taints: dedicated: tidb:NoSchedule - + iam: + withAddonPolicies: + ebs: true - name: pd-1a desiredCapacity: 1 privateNetworking: true @@ -100,6 +112,9 @@ nodeGroups: dedicated: pd taints: dedicated: pd:NoSchedule + iam: + withAddonPolicies: + ebs: true - name: pd-1d desiredCapacity: 1 privateNetworking: true @@ -109,6 +124,9 @@ nodeGroups: dedicated: pd taints: dedicated: pd:NoSchedule + iam: + withAddonPolicies: + ebs: true - name: pd-1c desiredCapacity: 1 privateNetworking: true @@ -118,7 +136,9 @@ nodeGroups: dedicated: pd taints: dedicated: pd:NoSchedule - + iam: + withAddonPolicies: + ebs: true - name: tikv-1a desiredCapacity: 1 privateNetworking: true @@ -128,6 +148,9 @@ nodeGroups: dedicated: tikv taints: dedicated: tikv:NoSchedule + iam: + withAddonPolicies: + ebs: true - name: tikv-1d desiredCapacity: 1 privateNetworking: true @@ -146,6 +169,9 @@ nodeGroups: dedicated: tikv taints: dedicated: tikv:NoSchedule + iam: + withAddonPolicies: + ebs: true ``` 默认只需要两个 TiDB 节点,因此可以设置 `tidb-1d` 节点组的 `desiredCapacity` 为 `0`,后面如果需要可以随时扩容这个节点组。 From e1ba9042463799b952e26c8ba62d87ca0885ddcd Mon Sep 17 00:00:00 2001 From: xjiaqing Date: Mon, 15 Jan 2024 22:19:44 +0800 Subject: [PATCH 2/3] update iam policy spec for ebs-csi-driver in node group --- en/deploy-on-aws-eks.md | 22 +++++++++++++++++++++- zh/deploy-on-aws-eks.md | 22 +++++++++++++++++++++- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/en/deploy-on-aws-eks.md b/en/deploy-on-aws-eks.md index 0883b6e19..25f859fe4 100644 --- a/en/deploy-on-aws-eks.md +++ b/en/deploy-on-aws-eks.md @@ -313,6 +313,9 @@ The following `c5d.4xlarge` example shows how to configure StorageClass for the dedicated: tikv taints: dedicated: tikv:NoSchedule + iam: + withAddonPolicies: + ebs: true ... ``` @@ -602,6 +605,9 @@ In the configuration file of eksctl (`cluster.yaml`), add the following two item dedicated: tiflash taints: dedicated: tiflash:NoSchedule + iam: + withAddonPolicies: + ebs: true - name: tiflash-1d desiredCapacity: 1 privateNetworking: true @@ -610,6 +616,9 @@ In the configuration file of eksctl (`cluster.yaml`), add the following two item dedicated: tiflash taints: dedicated: tiflash:NoSchedule + iam: + withAddonPolicies: + ebs: true - name: tiflash-1c desiredCapacity: 1 privateNetworking: true @@ -618,7 +627,9 @@ In the configuration file of eksctl (`cluster.yaml`), add the following two item dedicated: tiflash taints: dedicated: tiflash:NoSchedule - + iam: + withAddonPolicies: + ebs: true - name: ticdc-1a desiredCapacity: 1 privateNetworking: true @@ -627,6 +638,9 @@ In the configuration file of eksctl (`cluster.yaml`), add the following two item dedicated: ticdc taints: dedicated: ticdc:NoSchedule + iam: + withAddonPolicies: + ebs: true - name: ticdc-1d desiredCapacity: 1 privateNetworking: true @@ -635,6 +649,9 @@ In the configuration file of eksctl (`cluster.yaml`), add the following two item dedicated: ticdc taints: dedicated: ticdc:NoSchedule + iam: + withAddonPolicies: + ebs: true - name: ticdc-1c desiredCapacity: 1 privateNetworking: true @@ -643,6 +660,9 @@ In the configuration file of eksctl (`cluster.yaml`), add the following two item dedicated: ticdc taints: dedicated: ticdc:NoSchedule + iam: + withAddonPolicies: + ebs: true ``` Depending on the EKS cluster status, use different commands: diff --git a/zh/deploy-on-aws-eks.md b/zh/deploy-on-aws-eks.md index a25f25be6..2c3e796fe 100644 --- a/zh/deploy-on-aws-eks.md +++ b/zh/deploy-on-aws-eks.md @@ -306,6 +306,9 @@ mountOptions: dedicated: tikv taints: dedicated: tikv:NoSchedule + iam: + withAddonPolicies: + ebs: true ... ``` @@ -584,6 +587,9 @@ eksctl scale nodegroup --cluster ${clusterName} --name tikv-1d --nodes 2 --nodes dedicated: tiflash taints: dedicated: tiflash:NoSchedule + iam: + withAddonPolicies: + ebs: true - name: tiflash-1d desiredCapacity: 1 privateNetworking: true @@ -592,6 +598,9 @@ eksctl scale nodegroup --cluster ${clusterName} --name tikv-1d --nodes 2 --nodes dedicated: tiflash taints: dedicated: tiflash:NoSchedule + iam: + withAddonPolicies: + ebs: true - name: tiflash-1c desiredCapacity: 1 privateNetworking: true @@ -600,7 +609,9 @@ eksctl scale nodegroup --cluster ${clusterName} --name tikv-1d --nodes 2 --nodes dedicated: tiflash taints: dedicated: tiflash:NoSchedule - + iam: + withAddonPolicies: + ebs: true - name: ticdc-1a desiredCapacity: 1 privateNetworking: true @@ -609,6 +620,9 @@ eksctl scale nodegroup --cluster ${clusterName} --name tikv-1d --nodes 2 --nodes dedicated: ticdc taints: dedicated: ticdc:NoSchedule + iam: + withAddonPolicies: + ebs: true - name: ticdc-1d desiredCapacity: 1 privateNetworking: true @@ -617,6 +631,9 @@ eksctl scale nodegroup --cluster ${clusterName} --name tikv-1d --nodes 2 --nodes dedicated: ticdc taints: dedicated: ticdc:NoSchedule + iam: + withAddonPolicies: + ebs: true - name: ticdc-1c desiredCapacity: 1 privateNetworking: true @@ -625,6 +642,9 @@ eksctl scale nodegroup --cluster ${clusterName} --name tikv-1d --nodes 2 --nodes dedicated: ticdc taints: dedicated: ticdc:NoSchedule + iam: + withAddonPolicies: + ebs: true ``` 具体命令根据 EKS 集群创建情况而定: From 1465776f3764c73c8c551d0dbad366475f11fce4 Mon Sep 17 00:00:00 2001 From: xjiaqing Date: Wed, 17 Jan 2024 14:36:31 +0800 Subject: [PATCH 3/3] fix update ebs addon policy --- en/deploy-on-aws-eks.md | 3 +++ zh/deploy-on-aws-eks.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/en/deploy-on-aws-eks.md b/en/deploy-on-aws-eks.md index 25f859fe4..77f039233 100644 --- a/en/deploy-on-aws-eks.md +++ b/en/deploy-on-aws-eks.md @@ -159,6 +159,9 @@ nodeGroups: dedicated: tikv taints: dedicated: tikv:NoSchedule + iam: + withAddonPolicies: + ebs: true - name: tikv-1c desiredCapacity: 1 privateNetworking: true diff --git a/zh/deploy-on-aws-eks.md b/zh/deploy-on-aws-eks.md index 2c3e796fe..7107a376f 100644 --- a/zh/deploy-on-aws-eks.md +++ b/zh/deploy-on-aws-eks.md @@ -160,6 +160,9 @@ nodeGroups: dedicated: tikv taints: dedicated: tikv:NoSchedule + iam: + withAddonPolicies: + ebs: true - name: tikv-1c desiredCapacity: 1 privateNetworking: true