Multi-Batch Release
Multi-Batch Strategy Process
Multi-batch strategy is a special kind of canary release that requires no extra workload for canary analysis. It is generally used by applications that have more than one replicas and often used without traffic routing changes.
Recommended Configuration
Note: v1beta1 available from Kruise Rollout v0.5.0.
- v1beta1
- v1alpha1
apiVersion: rollouts.kruise.io/v1beta1
kind: Rollout
metadata:
name: rollouts-demo
spec:
workloadRef:
apiVersion: apps/v1
kind: Deployment
name: workload-demo
strategy:
canary:
enableExtraWorkloadForCanary: false
steps:
- replicas: 1
- replicas: 50%
- replicas: 100%
apiVersion: rollouts.kruise.io/v1alpha1
kind: Rollout
metadata:
name: rollouts-demo
annotations:
rollouts.kruise.io/rolling-style: partition
spec:
objectRef:
workloadRef:
apiVersion: apps/v1
kind: Deployment
name: workload-demo
strategy:
canary:
steps:
- replicas: 1
- replicas: 50%
- replicas: 100%
Note: Currently, multi-batch strategy can work on CloneSet, StatefulSet, Advanced StatefulSet, and Deployment.
Behavior Explanation
When you apply a new revision for workload-demo
:
1
Pods will be updated andreplicas-1
Pods is still at stable revision in the 1-st batch, need manual confirmation to next batch.50%
Pods will be updated and50%
Pods is still at stable revision in the 2-nd batch, need manual confirmation to next batch.100%
Pods will be updated and0
Pods is still at stable revision in the 3-rd batch.
Different from canary release strategy, No extra Deployment is created during rollout progressing.