Deploy a TiDB Cluster on ARM64 Machines

This document describes how to deploy a TiDB cluster on ARM64 machines.

Prerequisites

Before starting the process, make sure that Kubernetes clusters are deployed on your ARM64 machines. If Kubernetes clusters are not deployed, refer to Deploy the Kubernetes cluster.

Deploy TiDB operator

The process of deploying TiDB operator on ARM64 machines is the same as the process of Deploy TiDB Operator in Kubernetes. Note that with TiDB Operator versions earlier than v1.3.2, you should change the following configuration in the step Customize TiDB operator deployment: after getting the values.yaml file of the tidb-operator chart, you need to modify the operatorImage and tidbBackupManagerImage fields in that file to the ARM64 image versions. For example:

  1. # ...
  2. operatorImage: pingcap/tidb-operator-arm64:v1.3.1
  3. # ...
  4. tidbBackupManagerImage: pingcap/tidb-backup-manager-arm64:v1.3.1
  5. # ...

Deploy a TiDB cluster

The process of deploying a TiDB cluster on ARM64 machines is the same as the process of Deploy TiDB in General Kubernetes. The only difference is that, in the TidbCluster definition file, you need to set the images of the related components to the ARM64 versions. For example:

  1. apiVersion: pingcap.com/v1alpha1
  2. kind: TidbCluster
  3. metadata:
  4. name: ${cluster_name}
  5. namespace: ${cluster_namespace}
  6. spec:
  7. version: "v5.4.0"
  8. # ...
  9. helper:
  10. image: busybox:1.33.0
  11. # ...
  12. pd:
  13. baseImage: pingcap/pd-arm64
  14. # ...
  15. tidb:
  16. baseImage: pingcap/tidb-arm64
  17. # ...
  18. tikv:
  19. baseImage: pingcap/tikv-arm64
  20. # ...
  21. pump:
  22. baseImage: pingcap/tidb-binlog-arm64
  23. # ...
  24. ticdc:
  25. baseImage: pingcap/ticdc-arm64
  26. # ...
  27. tiflash:
  28. baseImage: pingcap/tiflash-arm64
  29. # ...

Initialize a TiDB cluster

The process of initializing a TiDB cluster on ARM64 machines is the same as the process of Initialize a TiDB Cluster in Kubernetes. The only difference is that you need to modify the spec.image field in the TidbInitializer definition file to the ARM64 image version. For example:

  1. apiVersion: pingcap.com/v1alpha1
  2. kind: TidbInitializer
  3. metadata:
  4. name: ${initializer_name}
  5. namespace: ${cluster_namespace}
  6. spec:
  7. image: kanshiori/mysqlclient-arm64
  8. # ...

Deploy monitoring for a TiDB cluster

The process of deploying monitoring for a TiDB cluster on ARM64 machines is the same as the process of Deploy Monitoring and Alerts for a TiDB Cluster. Note that with TiDB versions earlier than v5.4.0, you need to modify the spec.initializer.baseImage field in the TidbMonitor definition file to the ARM64 image.

  1. apiVersion: pingcap.com/v1alpha1
  2. kind: TidbMonitor
  3. metadata:
  4. name: ${monitor_name}
  5. spec:
  6. # ...
  7. initializer:
  8. baseImage: pingcap/tidb-monitor-initializer-arm64
  9. # ...