Upgrade TiDB Operator and Kubernetes
This document describes how to upgrade TiDB Operator and Kubernetes.
Upgrade TiDB Operator
Update CRD (Custom Resource Definition):
kubectl apply -f https://raw.githubusercontent.com/pingcap/tidb-operator/<version>/manifests/crd.yaml && \ kubectl get crd tidbclusters.pingcap.comGet the
values.yaml
file of thetidb-operator
chart that you want to install:mkdir -p /home/tidb/tidb-operator/<version> && \ helm inspect values pingcap/tidb-operator --version=<version> > /home/tidb/tidb-operator/<version>/values-tidb-operator.yamlModify the
operatorImage
image in the/home/tidb/tidb-operator/<version>/values-tidb-operator.yaml
file. Merge the customized configuration in the oldvalues.yaml
file with the/home/tidb/tidb-operator/<version>/values-tidb-operator.yaml
file, and executehelm upgrade
:helm upgrade tidb-operator pingcap/tidb-operator --version=<version> -f /home/tidb/tidb-operator/<version>/values-tidb-operator.yaml
Upgrade Kubernetes
When there is a major version upgrade of Kubernetes, you need to make sure that kubeSchedulerImageTag
matches the version. By default, this value is generated by Helm during the installation or upgrade process. To reset this value, execute helm upgrade
.