TiDB Operator Overview
TiDB Operator is an automatic operation system for TiDB clusters on Kubernetes. It provides a full management life-cycle for TiDB including deployment, upgrades, scaling, backup, fail-over, and configuration changes. With TiDB Operator, TiDB can run seamlessly in the Kubernetes clusters deployed on a public cloud or in a self-managed environment.
The corresponding relationship between TiDB Operator and TiDB versions is as follows:
TiDB versions | Compatible TiDB Operator versions |
---|---|
dev | dev |
TiDB >= 8.0 | 1.6 (Recommended), 1.5 |
7.1 <= TiDB < 8.0 | 1.5 (Recommended), 1.4 |
6.5 <= TiDB < 7.1 | 1.5, 1.4 (Recommended), 1.3 |
5.4 <= TiDB < 6.5 | 1.4, 1.3 (Recommended) |
5.1 <= TiDB < 5.4 | 1.4, 1.3 (Recommended), 1.2 |
3.0 <= TiDB < 5.1 | 1.4, 1.3 (Recommended), 1.2, 1.1 |
2.1 <= TiDB < v3.0 | 1.0 (End of support) |
Manage TiDB clusters using TiDB Operator
TiDB Operator provides several ways to deploy TiDB clusters on Kubernetes:
For test environment:
- Get Started using kind, Minikube, or the Google Cloud Shell
For production environment:
In an existing Kubernetes cluster:
First install TiDB Operator on a Kubernetes cluster according to Deploy TiDB Operator on Kubernetes, then deploy your TiDB clusters according to Deploy TiDB on General Kubernetes.
You also need to adjust the configuration of the Kubernetes cluster based on Prerequisites for TiDB on Kubernetes and configure the local PV for your Kubernetes cluster to achieve low latency of local storage for TiKV according to Local PV Configuration.
Before deploying TiDB on any of the above two environments, you can always refer to TiDB Cluster Configuration Document to customize TiDB configurations.
After the deployment is complete, see the following documents to use, operate, and maintain TiDB clusters on Kubernetes:
- Access the TiDB Cluster
- Scale TiDB Cluster
- Upgrade a TiDB Cluster
- Change the Configuration of TiDB Cluster
- Back up and Restore a TiDB Cluster
- Automatic Failover
- Monitor a TiDB Cluster on Kubernetes
- View TiDB Logs on Kubernetes
- Maintain Kubernetes Nodes that Hold the TiDB Cluster
When a problem occurs and the cluster needs diagnosis, you can:
- See TiDB FAQs on Kubernetes for any available solution;
- See Troubleshoot TiDB on Kubernetes to shoot troubles.
Some of TiDB's tools are used differently on Kubernetes. You can see Tools on Kubernetes to understand how TiDB tools are used on Kubernetes.
Finally, when a new version of TiDB Operator is released, you can refer to Upgrade TiDB Operator to upgrade to the latest version.