instruction: Create a Dockerfile for workloads
output: ```dockerfile
  from the percentage by rounding up. The default value is 25%.For example, when this value is set to 30%, the new ReplicaSet can be scaled up immediately when the
  rolling update starts, such that the total number of old and new Pods does not exceed 130% of desired
  Pods. Once old Pods have been killed, the new ReplicaSet can be scaled up further, ensuring that the
  total number of Pods running at any time during the update is at most 130% of desired Pods.Here are some Rolling Update Deployment examples that use the maxUnavailable and maxSurge:Max UnavailableMax SurgeHybridapiVersion: 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.14.2
   ports:
   - containerPort: 80
   strategy:
   type: RollingUpdate
   rollingUpdate:
   maxUnavailable: 1
  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.14.2
   ports:
   - containerPort: 80
   strategy:
   type: RollingUpdate
   rollingUpdate:
   maxSurge: 1
  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.14.2
   ports:
   - containerPort: 80
   strategy:
   type: RollingUpdate
   rollingUpdate:
   maxSurge: 1
   maxUnavailable: 1
  Progress Deadline Seconds.spec.progressDeadlineSeconds is an optional field that specifies the number of seconds you want
  to wait for your Deployment to progress before the system reports back that the Deployment has
  failed progressing - surfaced as a condition with type: Progressing, status: "False".
  and reason: ProgressDeadlineExceeded in the status of the resource. The Deployment controller will keep
  retrying the Deployment. This defaults to 600. In the future, once automatic rollback will be implemented, the Deployment
  controller will roll back a Deployment as soon as it observes such a condition.If specified, this field needs to be greater than .spec.minReadySeconds.Min Ready Seconds.spec.minReadySeconds is an optional field that specifies the minimum number of seconds for which a newly
  created Pod should be ready without any of its containers crashing, for it to be considered available.
  This defaults to 0 (the Pod will be considered available as soon as it is ready). To learn more about when
  a Pod is considered ready, see Container Probes.Revision History LimitA Deployment's revision history is stored in the ReplicaSets it controls..spec.revisionHistoryLimit is an optional field that specifies the number of old ReplicaSets to retain
  to allow rollback. These old ReplicaSets consume resources in etcd and crowd the output of kubectl get rs. The configuration of each Deployment revision is stored in its ReplicaSets; therefore, once an old ReplicaSet is deleted, you lose the ability to rollback to that revision of Deployment. By default, 10 old ReplicaSets will be kept, however its ideal value depends on the frequency and stability of new Deployments.More specifically, setting this field to zero means that all old ReplicaSets with 0 replicas will be cleaned up.
  In this case, a new Deployment rollout cannot be undone, since its revision history is cleaned up.Paused.spec.paused is an optional boolean field for pausing and resuming a Deployment. The only difference between
  a paused Deployment and one that is not paused, is that any changes into the PodTemplateSpec of the paused
  Deployment will not trigger new rollouts as long as it is paused. A Deployment is not paused by default when
  it is created.What's nextLearn more about Pods.Run a stateless application using a Deployment.Read the
  Deployment to understand the Deployment API.Read about PodDisruptionBudget and how
  you can use it to manage application availability during disruptions.Use kubectl to create a Deployment.FeedbackWas this page helpful?Yes
  NoThanks for the feedback. If you have a specific, answerable question about how to use Kubernetes, ask it on
  Stack Overflow.
  Open an issue in the GitHub Repository if you want to
  report a problem
  or
  suggest an improvement.Last modified February 21, 2025 at 4:34 PM PST: Update content/en/docs/concepts/workloads/controllers/deployment.md (faaae90b41) Deployment API reference
    Create child page
   Create an issue
   Print entire sectionUse CaseCreating a DeploymentPod-template-hash labelUpdating a DeploymentRollover (aka multiple updates in-flight)Label selector updatesRolling Back a DeploymentChecking Rollout History of a DeploymentRolling Back to a Previous RevisionScaling a DeploymentProportional scalingPausing and Resuming a rollout of a DeploymentDeployment statusProgressing DeploymentComplete DeploymentFailed DeploymentOperating on a failed deploymentClean up PolicyCanary DeploymentWriting a Deployment SpecPod TemplateReplicasSelectorStrategyProgress Deadline SecondsMin Ready SecondsRevision History LimitPausedWhat's next© 2025 The Kubernetes Authors | Documentation Distributed under CC BY 4.0© 2025 The Linux Foundation ®. ```