Skip to content

Commit 664de5d

Browse files
author
Tim Bannister
committed
Use note and caution shortcode blocks
1 parent 811d183 commit 664de5d

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

content/en/docs/tasks/run-application/run-replicated-stateful-application.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ replication.
2424
on general patterns for running stateful applications in Kubernetes.
2525
{{< /note >}}
2626

27-
28-
2927
## {{% heading "prerequisites" %}}
3028

3129

@@ -132,8 +130,11 @@ mysql-2 2/2 Running 0 1m
132130
```
133131

134132
Press **Ctrl+C** to cancel the watch.
133+
134+
{{< note >}}
135135
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 >}}
137138

138139
This manifest uses a variety of techniques for managing stateful Pods as part of
139140
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
375376
no new Pods may schedule there, and then evicts any existing Pods.
376377
Replace `<node-name>` with the name of the Node you found in the last step.
377378

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 >}}
380384

381385
```shell
386+
# See above advice about impact on other workloads
382387
kubectl drain <node-name> --force --delete-emptydir-data --ignore-daemonsets
383388
```
384389

@@ -453,10 +458,13 @@ Scaling back down is also seamless:
453458
kubectl scale statefulset mysql --replicas=3
454459
```
455460

456-
Note, however, that while scaling up creates new PersistentVolumeClaims
461+
{{< note >}}
462+
Although scaling up creates new PersistentVolumeClaims
457463
automatically, scaling down does not automatically delete these PVCs.
464+
458465
This gives you the choice to keep those initialized PVCs around to make
459466
scaling back up quicker, or to extract data before deleting them.
467+
{{< /note >}}
460468

461469
You can see this by running:
462470

0 commit comments

Comments
 (0)