pingcap / docs-tidb-operator

Documentation for TiDB on Kubernetes in both English and Chinese.
https://docs.pingcap.com/tidb-in-kubernetes
Other
47 stars 118 forks source link

Install ebs-csi-driver when creating eks cluster #2483

Closed xjiaqing closed 8 months ago

xjiaqing commented 8 months ago

File: /release-1.5/en/deploy-on-aws-eks.md

In tree kubernetes.io/aws-ebs plugin has been deprecated since Kubernetes 1.17, and in the new version eks cluster, ebs-csi-driver will not be installed by default.

Therefore, it is necessary to install ebs-csi-driver in the eksctl yaml file to ensure that users can install the tidb cluster after creating the eks cluster.

The following modifications need to be made in the example eksctl yaml file:

  1. Specify the installation of the ebs-csi-driver addon at the top level of the eksctl file

    addons:
    - name: aws-ebs-csi-driver
  2. Configure the required permissions for nodes in the node group

    nodeGroups:
    - name: admin
    ...
    iam:
      withAddonPolicies:
        ebs: true

Here is the complete example:

apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
  name: ${clusterName}
  region: ap-northeast-1
addons:
  - name: aws-ebs-csi-driver
nodeGroups:
  - name: admin
    desiredCapacity: 1
    privateNetworking: true
    labels:
      dedicated: admin
    iam:
      withAddonPolicies:
        ebs: true
  - name: tidb-1a
    desiredCapacity: 1
    privateNetworking: true
    availabilityZones:
      - ap-northeast-1a
    instanceType: c5.2xlarge
    labels:
      dedicated: tidb
    taints:
      dedicated: tidb:NoSchedule
    iam:
      withAddonPolicies:
        ebs: true
  - name: tidb-1d
    desiredCapacity: 0
    privateNetworking: true
    availabilityZones:
      - ap-northeast-1d
    instanceType: c5.2xlarge
    labels:
      dedicated: tidb
    taints:
      dedicated: tidb:NoSchedule
    iam:
      withAddonPolicies:
        ebs: true
  - name: tidb-1c
    desiredCapacity: 1
    privateNetworking: true
    availabilityZones:
      - ap-northeast-1c
    instanceType: c5.2xlarge
    labels:
      dedicated: tidb
    taints:
      dedicated: tidb:NoSchedule
    iam:
      withAddonPolicies:
        ebs: true
  - name: pd-1a
    desiredCapacity: 1
    privateNetworking: true
    availabilityZones:
      - ap-northeast-1a
    instanceType: c5.xlarge
    labels:
      dedicated: pd
    taints:
      dedicated: pd:NoSchedule
    iam:
      withAddonPolicies:
        ebs: true
  - name: pd-1d
    desiredCapacity: 1
    privateNetworking: true
    availabilityZones:
      - ap-northeast-1d
    instanceType: c5.xlarge
    labels:
      dedicated: pd
    taints:
      dedicated: pd:NoSchedule
    iam:
      withAddonPolicies:
        ebs: true
  - name: pd-1c
    desiredCapacity: 1
    privateNetworking: true
    availabilityZones:
      - ap-northeast-1c
    instanceType: c5.xlarge
    labels:
      dedicated: pd
    taints:
      dedicated: pd:NoSchedule
    iam:
      withAddonPolicies:
        ebs: true
  - name: tikv-1a
    desiredCapacity: 1
    privateNetworking: true
    availabilityZones:
      - ap-northeast-1a
    instanceType: r5b.2xlarge
    labels:
      dedicated: tikv
    taints:
      dedicated: tikv:NoSchedule
    iam:
      withAddonPolicies:
        ebs: true
  - name: tikv-1d
    desiredCapacity: 1
    privateNetworking: true
    availabilityZones:
      - ap-northeast-1d
    instanceType: r5b.2xlarge
    labels:
      dedicated: tikv
    taints:
      dedicated: tikv:NoSchedule
    iam:
      withAddonPolicies:
        ebs: true
  - name: tikv-1c
    desiredCapacity: 1
    privateNetworking: true
    availabilityZones:
      - ap-northeast-1c
    instanceType: r5b.2xlarge
    labels:
      dedicated: tikv
    taints:
      dedicated: tikv:NoSchedule
    iam:
      withAddonPolicies:
        ebs: true
xjiaqing commented 8 months ago

resolved by the PR #2499