Home Explore Blog CI



kubernetes

6th chunk of `content/en/blog/_posts/2018-03-00-How-To-Integrate-Rollingupdate-Strategy.md`
6e942a276f4ff4461398caa2d56fbf3da4f32ee81f374a860000000100000720
* **When RollingUpdate ends**: Kubernetes signals termination clearly. A rolling update completes when all of a set's Pods have been updated to the updateRevision. The status's currentRevision is set to updateRevision and its updateRevision is set to the empty string. The status's currentReplicas is set to updateReplicas and its updateReplicas are set to 0.

###  Controller revision in WQ-RDS

Revision information is stored in MysqlCluster.Status and is no different than Statefulset.Status.

```

root@k8s-master ~]# kubectl get mysqlcluster -o yaml clustershard-c

apiVersion: v1

items:

\- apiVersion: mysql.orain.com/v1

 kind: MysqlCluster

 metadata:

   creationTimestamp: 2017-10-20T08:19:41Z

   labels:

     AppName: clustershard-crm

     Createdby: orain.com

     DBType: MySQL

   name: clustershard-c

   namespace: default

   resourceVersion: "415852"

   uid: 6bb089bb-b56f-11e7-ae02-525400e717a6

 spec:



     dbresourcespec:

       limitedcpu: 1200m

       limitedmemory: 400Mi

       requestcpu: 1000m

       requestmemory: 400Mi



 status:

   currentReplicas: 8

   currentRevision: clustershard-c-648d878965

   replicas: 8

   updateRevision: clustershard-c-648d878965

kind: List

```

### Example: Perform a rolling upgrade

Finally, We can now update "clustershard-c" to update configuration "innodb_buffer_pool_size" from 6GB to 7GB and reboot.

The process takes 480 seconds.

![](https://lh4.googleusercontent.com/LOxFDdojYxnPvSHDYwivVge6vGImK7uTdyvCsKrxCMF3rIlVkw7mHeNhJiNJwz1aGzVhZXpqrgzHC6pIbkPk3JPAtuSqX9ovAYBzK01BGfzwkXvMGZomAh4L0DahGyD3QB715B-Z)

The upgrade is in monotonically decreasing manner:

![](https://lh6.googleusercontent.com/DhFbY3JDh23A_91c04TujxWM9xCX_xq1xOCXHi7XAd75LzKwDtbH6Gr_2VXCscg8AeVCQzw3Inw4M-uvssWq8od4va0wd-fIyClVY63FjRfeU16fQda_XqzBYRIhrG5W3tDnCAwC)

Title: Completion of RollingUpdate, Controller Revision in WQ-RDS, and Example Rolling Upgrade
Summary
This section describes the conditions that signal the completion of a rolling update in Kubernetes, specifically focusing on the status attributes that change when all Pods are updated to the updateRevision. It explains how revision information is stored in MysqlCluster.Status in WQ-RDS, mirroring StatefulSet.Status. The section includes a YAML example of a MysqlCluster object. Finally, it provides an example of performing a rolling upgrade on "clustershard-c" by updating the "innodb_buffer_pool_size" configuration, illustrating the monotonically decreasing manner of the upgrade process and the time it takes.