deployment:
--- apiVersion: apps/v1beta1 kind: Deployment metadata: name: nginx-deploy labels: app: nginx spec: # 副本数 replicas: 3 # 允许保留历史版本的数量 revisionHistoryLimit: 15 # 5秒之后执行操作 minReadySeconds: 5 strategy: # 升级 type: RollingUpdate rollingUpdate: maxSurge: 1 maxUnavailable: 1 template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.10.0 ports: - containerPort: 80