Skip to content

Commit

Permalink
Added Tabs to mention RollingUpdate Deployment Strategy YAMLs
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucifergene committed Sep 6, 2023
1 parent ae0a33d commit 70f2913
Showing 1 changed file with 99 additions and 0 deletions.
99 changes: 99 additions & 0 deletions content/en/docs/concepts/workloads/controllers/deployment.md
Expand Up @@ -1197,6 +1197,105 @@ rolling update starts, such that the total number of old and new Pods does not e
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`:

{{< tabs name="tab_with_md" >}}
{{% tab name="Max Unavailable" %}}

```yaml
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:
maxUnavailable: 1
```

{{% /tab %}}
{{% tab name="Max Surge" %}}

```yaml
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
```

{{% /tab %}}
{{% tab name="Hybrid" %}}

```yaml
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
```

{{% /tab %}}
{{< /tabs >}}

### Progress Deadline Seconds

`.spec.progressDeadlineSeconds` is an optional field that specifies the number of seconds you want
Expand Down

0 comments on commit 70f2913

Please sign in to comment.