@@ -24,8 +24,6 @@ replication.
24
24
on general patterns for running stateful applications in Kubernetes.
25
25
{{< /note >}}
26
26
27
-
28
-
29
27
## {{% heading "prerequisites" %}}
30
28
31
29
@@ -132,8 +130,11 @@ mysql-2 2/2 Running 0 1m
132
130
```
133
131
134
132
Press ** Ctrl+C** to cancel the watch.
133
+
134
+ {{< note >}}
135
135
If you don't see any progress, make sure you have a dynamic PersistentVolume
136
- provisioner enabled as mentioned in the [ prerequisites] ( #before-you-begin ) .
136
+ provisioner enabled, as mentioned in the [ prerequisites] ( #before-you-begin ) .
137
+ {{< /note >}}
137
138
138
139
This manifest uses a variety of techniques for managing stateful Pods as part of
139
140
a StatefulSet. The next section highlights some of these techniques to explain
@@ -375,10 +376,14 @@ Then drain the Node by running the following command, which cordons it so
375
376
no new Pods may schedule there, and then evicts any existing Pods.
376
377
Replace ` <node-name> ` with the name of the Node you found in the last step.
377
378
378
- This might impact other applications on the Node, so it's best to
379
- ** only do this in a test cluster** .
379
+ {{< caution >}}
380
+ Draining a Node can impact other workloads and applications that are
381
+ running on the same node, so only do the following step in a test
382
+ cluster.
383
+ {{< /caution >}}
380
384
381
385
``` shell
386
+ # See above advice about impact on other workloads
382
387
kubectl drain < node-name> --force --delete-emptydir-data --ignore-daemonsets
383
388
```
384
389
@@ -453,10 +458,13 @@ Scaling back down is also seamless:
453
458
kubectl scale statefulset mysql --replicas=3
454
459
```
455
460
456
- Note, however, that while scaling up creates new PersistentVolumeClaims
461
+ {{< note >}}
462
+ Although scaling up creates new PersistentVolumeClaims
457
463
automatically, scaling down does not automatically delete these PVCs.
464
+
458
465
This gives you the choice to keep those initialized PVCs around to make
459
466
scaling back up quicker, or to extract data before deleting them.
467
+ {{< /note >}}
460
468
461
469
You can see this by running:
462
470
0 commit comments