spec:
strategy:
type: Recreate
spec:
strategy:
rollingUpdate:
maxSuige: 25%
maxUnavailable: 25%
type: RollingUpdate
kubectl rollout pause deploy web-rollingupdate # 暂停部署
kubectl rollout resume deploy web-rollingupdate # 恢复部署
kubectl rollout undo deploy web-rollingupdate # 回滚
spec:
template:
metadata:
labels:
app: web-bluegren
version: v1.0
spec:
ports:
- port: 80
protocol: TCP
targetPort:8080
selector:
app: web-bluegreen
type: ClusterIP