Version: v1.0
Rollout Plan
In this documentation, we will show how to use the rollout plan to rolling update an application.
Overview
By default, when we update the properties of application, KubeVela will update the underlying instances directly. The availability of the application will be guaranteed by rollout traits (if any).
Though KubeVela also provides a rolling style update mechanism, you can specify the spec.rolloutPlan in application to do so.
Example
Deploy application to the cluster
apiVersion: core.oam.dev/v1beta1kind: Applicationmetadata:name: test-rollingspec:components:- name: metrics-providertype: workerproperties:cmd:- ./podinfo- stress-cpu=1.0image: stefanprodan/podinfo:4.0.6port: 8080rolloutPlan:rolloutStrategy: "IncreaseFirst"rolloutBatches:- replicas: 50%- replicas: 50%targetSize: 6
User can modify the application container command and apply
apiVersion: core.oam.dev/v1beta1kind: Applicationmetadata:name: test-rollingspec:components:- name: metrics-providertype: workerproperties:cmd:- ./podinfo- stress-cpu=2.0image: stefanprodan/podinfo:4.0.6port: 8080rolloutPlan:rolloutStrategy: "IncreaseFirst"rolloutBatches:- replicas: 50%- replicas: 50%targetSize: 6
User can check the status of the application and see the rollout completes, and the application’s status.rollout.rollingState becomes rolloutSucceed.