Skip to content

Commit 70f2913

Browse files
committed
Added Tabs to mention RollingUpdate Deployment Strategy YAMLs
1 parent ae0a33d commit 70f2913

File tree

1 file changed

+99
-0
lines changed

1 file changed

+99
-0
lines changed

content/en/docs/concepts/workloads/controllers/deployment.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,6 +1197,105 @@ rolling update starts, such that the total number of old and new Pods does not e
11971197
Pods. Once old Pods have been killed, the new ReplicaSet can be scaled up further, ensuring that the
11981198
total number of Pods running at any time during the update is at most 130% of desired Pods.
11991199

1200+
Here are some Rolling Update Deployment examples that use the `maxUnavailable` and `maxSurge`:
1201+
1202+
{{< tabs name="tab_with_md" >}}
1203+
{{% tab name="Max Unavailable" %}}
1204+
1205+
```yaml
1206+
apiVersion: apps/v1
1207+
kind: Deployment
1208+
metadata:
1209+
name: nginx-deployment
1210+
labels:
1211+
app: nginx
1212+
spec:
1213+
replicas: 3
1214+
selector:
1215+
matchLabels:
1216+
app: nginx
1217+
template:
1218+
metadata:
1219+
labels:
1220+
app: nginx
1221+
spec:
1222+
containers:
1223+
- name: nginx
1224+
image: nginx:1.14.2
1225+
ports:
1226+
- containerPort: 80
1227+
strategy:
1228+
type: RollingUpdate
1229+
rollingUpdate:
1230+
maxUnavailable: 1
1231+
```
1232+
1233+
{{% /tab %}}
1234+
{{% tab name="Max Surge" %}}
1235+
1236+
```yaml
1237+
apiVersion: apps/v1
1238+
kind: Deployment
1239+
metadata:
1240+
name: nginx-deployment
1241+
labels:
1242+
app: nginx
1243+
spec:
1244+
replicas: 3
1245+
selector:
1246+
matchLabels:
1247+
app: nginx
1248+
template:
1249+
metadata:
1250+
labels:
1251+
app: nginx
1252+
spec:
1253+
containers:
1254+
- name: nginx
1255+
image: nginx:1.14.2
1256+
ports:
1257+
- containerPort: 80
1258+
strategy:
1259+
type: RollingUpdate
1260+
rollingUpdate:
1261+
maxSurge: 1
1262+
```
1263+
1264+
{{% /tab %}}
1265+
{{% tab name="Hybrid" %}}
1266+
1267+
```yaml
1268+
apiVersion: apps/v1
1269+
kind: Deployment
1270+
metadata:
1271+
name: nginx-deployment
1272+
labels:
1273+
app: nginx
1274+
spec:
1275+
replicas: 3
1276+
selector:
1277+
matchLabels:
1278+
app: nginx
1279+
template:
1280+
metadata:
1281+
labels:
1282+
app: nginx
1283+
spec:
1284+
containers:
1285+
- name: nginx
1286+
image: nginx:1.14.2
1287+
ports:
1288+
- containerPort: 80
1289+
strategy:
1290+
type: RollingUpdate
1291+
rollingUpdate:
1292+
maxSurge: 1
1293+
maxUnavailable: 1
1294+
```
1295+
1296+
{{% /tab %}}
1297+
{{< /tabs >}}
1298+
12001299
### Progress Deadline Seconds
12011300
12021301
`.spec.progressDeadlineSeconds` is an optional field that specifies the number of seconds you want

0 commit comments

Comments
 (0)