# How to do a rolling restart of TiKV using tidb-operator

## Problem Summary

--------------------
On a kubernetes cluster, you can gracefully restart all or some components with the tidb-operator by adding annotations config file

## Solution/Next step

--------------------

modify the cluster configuration by running the following command:

```{.bash .copyable}
kubectl edit tc ${name} -n ${namespace}
```

In the following example, annotations of the pd, tikv, and tidb components are set, which means that all the Pods in these three components will be gracefully rolling restarted. You can set the annotation for a specific component according to your needs.

```yaml
apiVersion: pingcap.com/v1alpha1  
kind: TidbCluster  
metadata:  
  name: basic  
spec:  
  version: v5.3  
  timezone: UTC  
  pvReclaimPolicy: Delete  
  pd:  
    baseImage: pingcap/pd  
    replicas: 3  
    requests:  
      storage: "1Gi"  
    config: {}  
    annotations:  
      tidb.pingcap.com/restartedAt: 2022\-04\-20T12:00  
  tikv:  
    baseImage: pingcap/tikv  
    replicas: 3  
    requests:  
      storage: "1Gi"  
    config: {}  
    annotations:  
      tidb.pingcap.com/restartedAt: 2022\-04\-20T12:00  
  tidb:  
    baseImage: pingcap/tidb  
    replicas: 2  
    service:  
      type: ClusterIP  
    config: {}  
    annotations:  
      tidb.pingcap.com/restartedAt: 2022\-04\-20T12:00
```
