当前位置:网站首页>Grayscale upgrade tidb operator
Grayscale upgrade tidb operator
2022-07-06 08:02:00 【Tianxiang shop】
If you want to upgrade TiDB Operator To the latest version , At the same time, I hope to control the impact of the upgrade , Avoid damage to the whole Kubernetes All in the cluster TiDB Clusters have unpredictable effects , It can be upgraded by grayscale upgrading TiDB Operator. After using grayscale upgrade , You can confirm in the grayscale deployment cluster TiDB Operator The impact of the upgrade , Upon confirmation of TiDB Operator After the new version works stably , Again Normal upgrade TiDB Operator.
TiDB Operator Currently, only some components can be grayed out , namely tidb-controller-manager and tidb-scheduler, No support for Enhanced StatefulSet controller and Access controller Grayscale upgrade .
In the use of TiDB Operator when ,tidb-scheduler It's not necessary to use . You can refer to tidb-scheduler And default-scheduler, Confirm whether to deploy tidb-scheduler.
The first 1 Step : For the current TiDB Operator To configure selector And perform the upgrade
At present TiDB Operator Of values.yaml in , Add the following selector To configure :
controllerManager: selector: - version!=canary
Reference resources Online upgrade or Offline upgrade , For the current TiDB Operator Perform the upgrade steps :
helm upgrade tidb-operator pingcap/tidb-operator --version=${chart_version} -f ${HOME}/tidb-operator/values-tidb-operator.yaml
The first 2 Step : Deploy grayscale TiDB Operator
Reference resources Online deployment TiDB Operator Of the 1 And the first step 2 Step , Get the grayscale version you want to deploy TiDB Operator Of
values.yamlfile , And invalues.yamlAdd the following configuration .controllerManager: selector: - version=canary appendReleaseSuffix: true #scheduler: # create: false # If you don't need to `tidb-scheduler`, Set this value to false advancedStatefulset: create: false admissionWebhook: create: falseappendReleaseSuffixI need to set totrue.If you don't need grayscale upgrade tidb-scheduler, You can set
scheduler.create: false. If you need a grayscale upgrade tidb-scheduler, To configurescheduler.create: true, Will create a file named{ { .scheduler.schedulerName }}-{ {.Release.Name}}Of scheduler. If you want to deploy in grayscale TiDB Operator Use this scheduler, Need configuration TidbCluster CR Mediumspec.schedulerNameFor this scheduler Name .Because grayscale upgrade does not support enhanced StatefulSet Controller and access controller , You have to configure
advancedStatefulset.create: falseandadmissionWebhook.create: false.For more information about the parameters related to gray-scale deployment , May refer to Use multiple sets TiDB Operator Manage different TiDB colony - Related parameters .
stay Different namespace in ( for example
tidb-admin-canary), Use Different Helm Release Name( for examplehelm install tidb-operator-canary ...) Deploy grayscale TiDB Operator:helm install tidb-operator-canary pingcap/tidb-operator --namespace=tidb-admin-canary --version=${operator_version} -f ${HOME}/tidb-operator/${operator_version}/values-tidb-operator.yamltake
${operator_version}Replace with the one you need to upgrade to TiDB Operator Version number .
The first 3 Step : Test grayscale TiDB Operator ( Optional )
Upgrade normally TiDB Operator front , Gray scale deployment can be tested TiDB Operator Whether it works stably . The components that support testing are tidb-controller-manager and tidb-scheduler.
If you need to test grayscale deployment tidb-controller-manager, This can be done by the following command , For a TiDB Cluster settings label:
kubectl -n ${namespace} label tc ${cluster_name} version=canaryBy viewing the two deployed tidb-controller-manager Log , You can confirm this setting label Of TiDB Clusters have been deployed by grayscale TiDB Operator management . The steps to view the log are as follows :
View the current TiDB Operator Of tidb-controller-manager Log :
kubectl -n tidb-admin logs tidb-controller-manager-55b887bdc9-lzdwvThe expected output is as follows :
I0305 07:52:04.558973 1 tidb_cluster_controller.go:148] TidbCluster has been deleted tidb-cluster-1/basic1View grayscale deployment TiDB Operator Of tidb-controller-manager Log :
kubectl -n tidb-admin-canary logs tidb-controller-manager-canary-6dcb9bdd95-qf4qrThe expected output is as follows :
I0113 03:38:43.859387 1 tidbcluster_control.go:69] TidbCluster: [tidb-cluster-1/basic1] updated successfully
If you need to test grayscale deployment tidb-scheduler, This can be done by the following command , For a TiDB Cluster modification
spec.schedulerNamebytidb-scheduler-canary:kubectl -n ${namespace} edit tc ${cluster_name}After modification , Components in the cluster will be upgraded in a rolling manner , By viewing the grayscale deployment TiDB Operator Of
tidb-schedulerLog , You can confirm that the cluster has used grayscaletidb-scheduler:kubectl -n tidb-admin-canary logs tidb-scheduler-canary-7f7b6c7c6-j5p2j -c tidb-schedulerAfter the test is completed , You can undo the changes in the previous two steps , Reuse the current TiDB Operator To manage TiDB colony .
kubectl -n ${namespace} label tc ${cluster_name} version-kubectl -n ${namespace} edit tc ${cluster_name}
The first 4 Step : Normal upgrade TiDB Operator
Confirm the grayscale deployment TiDB Operator After normal operation , It can be upgraded normally TiDB Operator.
Delete grayscale deployment TiDB Operator:
helm -n tidb-admin-canary uninstall ${release_name}normal upgrade TiDB Operator.
边栏推荐
- It's hard to find a job when the industry is in recession
- Notes on software development
- How to prevent Association in cross-border e-commerce multi account operations?
- 面向个性化需求的在线云数据库混合调优系统 | SIGMOD 2022入选论文解读
- Leetcode question brushing record | 203_ Remove linked list elements
- MEX有关的学习
- A Closer Look at How Fine-tuning Changes BERT
- Mex related learning
- C语言 - 位段
- 指针和数组笔试题解析
猜你喜欢

2.10transfrom attribute
![08- [istio] istio gateway, virtual service and the relationship between them](/img/fb/09793f5fd12c2906b73cc42722165f.jpg)
08- [istio] istio gateway, virtual service and the relationship between them

Convolution, pooling, activation function, initialization, normalization, regularization, learning rate - Summary of deep learning foundation

Risk planning and identification of Oracle project management system

【T31ZL智能视频应用处理器资料】

继电反馈PID控制器参数自整定

wincc7.5下载安装教程(Win10系统)

数据治理:主数据的3特征、4超越和3二八原则

Go learning notes (3) basic types and statements (2)

The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
随机推荐
Wireshark grabs packets to understand its word TCP segment
Erc20 token agreement
Convolution, pooling, activation function, initialization, normalization, regularization, learning rate - Summary of deep learning foundation
2.10transfrom attribute
"Designer universe" APEC design +: the list of winners of the Paris Design Award in France was recently announced. The winners of "Changsha world center Damei mansion" were awarded by the national eco
Inspiration from the recruitment of bioinformatics analysts in the Department of laboratory medicine, Zhujiang Hospital, Southern Medical University
Data governance: 3 characteristics, 4 transcendence and 3 28 principles of master data
使用 BR 备份 TiDB 集群数据到兼容 S3 的存储
23. Update data
hcip--mpls
Notes on software development
[t31zl intelligent video application processor data]
数据治理:主数据的3特征、4超越和3二八原则
The Vice Minister of the Ministry of industry and information technology of "APEC industry +" of the national economic and information technology center led a team to Sichuan to investigate the operat
"Designer universe" Guangdong responds to the opinions of the national development and Reform Commission. Primary school students incarnate as small community designers | national economic and Informa
Learn Arduino with examples
指针和数组笔试题解析
从 CSV 文件迁移数据到 TiDB
[research materials] 2022 enterprise wechat Ecosystem Research Report - Download attached
What is the use of entering the critical point? How to realize STM32 single chip microcomputer?