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)
[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]
Specify the version, installation path, and change the port number during deployment.
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.
This kind of mixed deployment has no performance at all, and there are very few people in the community using k8s.
Why deploy it this way? Wouldn’t it be better to apply for a server, or run two sets of services on one cluster?
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.
After the deployment is completed and the business verification is successful, the old cluster will be decommissioned.
Specify port and storage path
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.
Oh, you want to migrate and upgrade? Then just change the port and install it.
I haven’t changed the port before. I’m curious if it can be changed by deploying in different namespaces in k8s.
It feels strange why it is deployed like this.
Migration and upgrade are being used in the same environment, and the old version cluster will be decommissioned later.
Isn’t it possible to deploy using different namespaces?
I will try installing different versions in different environments.
Change the paths and ports.
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.
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.
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.