How to Deploy Two Different Versions of TiDB Clusters (e.g., 6.4.0 and 7.1.0) in the Same Environment

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 如何在同一环境下部署两套不同版本的tidb集群(如6.4.0和7.1.0)

| username: ks_ops_ms

[TiDB Usage Environment] Production Environment / Testing / Poc
[TiDB Version] 6.4.0
[Reproduction Path] What operations were performed that caused the issue
[Encountered Issue: Issue Phenomenon and Impact]
[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots / Logs / Monitoring]

| username: chenhanneu | Original post link

Specify the version, installation path, and change the port number during deployment.

| username: ks_ops_ms | Original post link

In the cluster, it is set up through CRD, and the version is specified in the CRD. It seems that starting a different version in the same environment requires modifying the configuration in the CRD, but this will affect the existing cluster.

| username: 像风一样的男子 | Original post link

This kind of mixed deployment has no performance at all, and there are very few people in the community using k8s.

| username: 路在何chu | Original post link

Why deploy it this way? Wouldn’t it be better to apply for a server, or run two sets of services on one cluster?

| username: ks_ops_ms | Original post link

For upgrading the TiDB version on a k8s cluster, according to the documentation, there is no rollback plan. You can only migrate from a lower version to a higher version or migrate to a lower version and then upgrade. If you set up a new environment, the original database can only be in another environment.

| username: ks_ops_ms | Original post link

After the deployment is completed and the business verification is successful, the old cluster will be decommissioned.

| username: Fly-bird | Original post link

Specify port and storage path

| username: ks_ops_ms | Original post link

It’s not two sets of business, but the same set of business. The current TiDB needs to be upgraded, but the official documentation for the upgrade is too hasty and lacks a rollback plan for upgrade failures. After ruling out the solution of setting up TiDB in two different clusters, I’m considering whether it’s possible to set up two clusters of different versions in the same environment for the upgrade.

| username: 路在何chu | Original post link

Oh, you want to migrate and upgrade? Then just change the port and install it.

| username: ks_ops_ms | Original post link

I haven’t changed the port before. I’m curious if it can be changed by deploying in different namespaces in k8s.

| username: zhanggame1 | Original post link

It feels strange why it is deployed like this.

| username: ks_ops_ms | Original post link

Migration and upgrade are being used in the same environment, and the old version cluster will be decommissioned later.

| username: tidb菜鸟一只 | Original post link

Isn’t it possible to deploy using different namespaces?

| username: ks_ops_ms | Original post link

I will try installing different versions in different environments.

| username: heiwandou | Original post link

Change the paths and ports.

| username: ks_ops_ms | Original post link

A new TiDB cluster has been set up with different cluster names, namespace names, and versions. It can run normally. Labels need to be specified in both the TiDB cluster and TiDB operator so that each operator can manage different clusters separately.

| username: tidb菜鸟一只 | Original post link

Sure.

| username: ks_ops_ms | Original post link

Will there be any issues with the DM tasks and CDC tasks of the original cluster during the TiDB migration and upgrade process? I just suddenly thought of this.

| username: 随缘天空 | Original post link

Specify different cluster names, modify the deployment location, and corresponding port numbers to avoid conflicts. However, the performance might not be very good since both clusters share the same machine’s configuration, CPU, disk, etc.