apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  labels:
    app: nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.7.9
        ports:
        - containerPort: 80
        resources:
          limits:
            cpu: "250m"

# kubectl rollout pause deployment.v1.apps/nginx-deployment
# kubectl set image deployment.v1.apps/nginx-deployment nginx=nginx:1.9.1
# kubectl rollout history deployment.v1.apps/nginx-deployment
# kubectl get rs
# kubectl set resources deployment.v1.apps/nginx-deployment -c=nginx --limits=cpu=200m,memory=512Mi
# kubectl rollout resume deployment.v1.apps/nginx-deployment
