为了测试方便,先部署测试使用的 deployment :
# deploy-demo.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deploy
namespace: default
spec:
replicas: 5
selector:
matchLabels:
app: nginx
release: stable
tier: slb
partition: website
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template:
metadata:
labels:
app: nginx
release: stable
tier: slb
partition: website
version: v1.12
spec:
containers:
- name: nginx-pod
image: linuxduduniao/nginx:v1.0.3