instruction: Create a Dockerfile for Nginx with production best practices
output: ```dockerfile
  from inside the cluster.
  kubectl set image deployment/nginx-deployment nginx=nginx:sometag
  The output is similar to this:
  deployment.apps/nginx-deployment image updated
  
  The image update starts a new rollout with ReplicaSet nginx-deployment-1989198191, but it's blocked due to the
  maxUnavailable requirement that you mentioned above. Check out the rollout status:
  kubectl get rs
  The output is similar to this:
  NAME DESIRED CURRENT READY AGE
  nginx-deployment-1989198191 5 5 0 9s
  nginx-deployment-618515232 8 8 8 1m
  
  Then a new scaling request for the Deployment comes along. The autoscaler increments the Deployment replicas
  to 15. The Deployment controller needs to decide where to add these new 5 replicas. If you weren't using
  proportional scaling, all 5 of them would be added in the new ReplicaSet. With proportional scaling, you
  spread the additional replicas across all ReplicaSets. Bigger proportions go to the ReplicaSets with the
  most replicas and lower proportions go to ReplicaSets with less replicas. Any leftovers are added to the
  ReplicaSet with the most replicas. ReplicaSets with zero replicas are not scaled up.
  
  In our example above, 3 replicas are added to the old ReplicaSet and 2 replicas are added to the
  new ReplicaSet. The rollout process should eventually move all replicas to the new ReplicaSet, assuming
  the new replicas become healthy. To confirm this, run:
  kubectl get deploy
  The output is similar to this:
  NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
  nginx-deployment 15 18 7 8 7m
  The rollout status confirms how the replicas were added to each ReplicaSet.
  kubectl get rs
  The output is similar to this:
  NAME DESIRED CURRENT READY AGE
  nginx-deployment-1989198191 7 7 0 7m
  nginx-deployment-618515232 11 11 11 7m
  Pausing and Resuming a rollout of a Deployment
  When you update a Deployment, or plan to, you can pause rollouts
  for that Deployment before you trigger one or more updates. When
  you're ready to apply those changes, you resume rollouts for the
  Deployment. This approach allows you to
  apply multiple fixes in between pausing and resuming without triggering unnecessary rollouts.
  
  For example, with a Deployment that was created:
  Get the Deployment details:
  kubectl get deploy
  The output is similar to this:
  NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
  nginx 3 3 3 3 1m
  Get the rollout status:
  kubectl get rs
  The output is similar to this:
  NAME DESIRED CURRENT READY AGE
  nginx-2142116321 3 3 3 1m
  
  Pause by running the following command:
  kubectl rollout pause deployment/nginx-deployment
  The output is similar to this:
  deployment.apps/nginx-deployment paused
  
  Then update the image of the Deployment:
  kubectl set image deployment/nginx-deployment nginx=nginx:1.16.1
  The output is similar to this:
  deployment.apps/nginx-deployment image updated
  
  Notice that no new rollout started:
  kubectl rollout history deployment/nginx-deployment
  The output is similar to this:
  deployments "nginx"
  REVISION CHANGE-CAUSE
  1 <none>
  
  Get the rollout status to verify that the existing ReplicaSet has not changed:
  kubectl get rs
  The output is similar to this:
  NAME DESIRED CURRENT READY AGE
  nginx-2142116321 3 3 3 2m
  
  You can make as many updates as you wish, for example, update the resources that will be used:
  kubectl set resources deployment/nginx-deployment -c=nginx --limits=cpu=200m,memory=512Mi
  The output is similar to this:
  deployment.apps/nginx-deployment resource requirements updated
  The initial state of the Deployment prior to pausing its rollout will continue its function, but new updates to
  the Deployment will not have any effect as long as the Deployment rollout is paused.
  
  Eventually, resume the Deployment rollout and observe a new ReplicaSet coming up with all the new updates:
  kubectl rollout resume deployment/nginx-deployment
  The output is similar to this:
  deployment.apps/nginx-deployment resumed
  
  Watch the status of the rollout until it's done.
  kubectl get rs -w
  The output is similar to this:
  NAME DESIRED CURRENT READY AGE
  nginx-2142116321 2 2 2 2m
  nginx-3926361531 2 2 0 6s
  nginx-3926361531 2 2 1 18s
  nginx-2142116321 1 2 2 2m
  nginx-2142116321 1 2 2 2m
  nginx-3926361531 3 2 1 18s
  nginx-3926361531 3 2 1 18s
  nginx-2142116321 1 1 1 2m
  nginx-3926361531 3 3 1 18s
  nginx-3926361531 3 3 2 19s
  nginx-2142116321 0 1 1 2m
  nginx-2142116321 0 1 1 2m
  nginx-2142116321 0 0 0 2m
  nginx-3926361531 3 3 3 20s
  
  Get the status of the latest rollout:
  kubectl get rs
  The output is similar to this:
  NAME DESIRED CURRENT READY AGE
  nginx-2142116321 0 0 0 2m
  nginx-3926361531 3 3 3 28s
  
  Note: You cannot rollback a paused Deployment until you resume it.
  
  Deployment status
  A Deployment enters various states during its lifecycle. It can be progressing while
  rolling out a new ReplicaSet, it can be complete, or it can fail to progress.
  Progressing Deployment
  Kubernetes marks a Deployment as progressing when one of the following tasks is performed:
  
  The Deployment creates a new ReplicaSet.
  The Deployment is scaling up its newest ReplicaSet.
  The Deployment is scaling down its older ReplicaSet(s).
  New Pods become ready or available (ready for at least MinReadySeconds).
  
  When the rollout becomes “progressing”, the Deployment controller adds a condition with the following
  attributes to the Deployment's .status.conditions:
  
  type: Progressing
  status: "True"
  reason: NewReplicaSetCreated | reason: FoundNewReplicaSet | reason: ReplicaSetUpdated
  
  You can monitor the progress for a Deployment by using kubectl rollout status.
  Complete Deployment
  Kubernetes marks a Deployment as complete when it has the following characteristics:
  
  All of the replicas associated with the Deployment have been updated to the latest version you've specified, meaning any
  updates you've requested have been completed.
  All of the replicas associated with the Deployment are available.
  No old replicas for the Deployment are running.
  
  When the rollout becomes “complete”, the Deployment controller sets a condition with the following
  attributes to the Deployment's .status.conditions:
  
  type: Progressing
  status: "True"
  reason: NewReplicaSetAvailable
  
  This Progressing condition will retain a status value of "True" until a new rollout
  is initiated. The condition holds even when availability of replicas changes (which
  does instead affect the Available condition).
  You can check if a Deployment has completed by using kubectl rollout status. If the rollout completed
  successfully, kubectl rollout status returns a zero exit code.
  kubectl rollout status deployment/nginx-deployment
  The output is similar to this:
  Waiting for rollout to finish: 2 of 3 updated replicas are available...
  deployment "nginx-deployment" successfully rolled out
  and the exit status
  ```