-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add documentation for scheduling a node drain when messing with nodes…
… on a prod cluster
- Loading branch information
1 parent
d31ee77
commit 070ae40
Showing
9 changed files
with
237 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 0 additions & 31 deletions
31
docs/modules/ROOT/partials/delete-node.adoc → ...modules/ROOT/partials/delete-node-vm.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
. Drain the node(s) | ||
+ | ||
[source,bash,subs="attributes+"] | ||
---- | ||
for node in $(echo -n {node-delete-list}); do | ||
kubectl --as=cluster-admin drain "${node}" \ | ||
--delete-emptydir-data --ignore-daemonsets | ||
done | ||
---- | ||
+ | ||
ifeval::["{cloud_provider}" == "cloudscale"] | ||
ifeval::["{delete-node-type}" == "storage"] | ||
[TIP] | ||
==== | ||
On cloudscale.ch, we configure Rook Ceph to setup the OSDs in "portable" mode. | ||
This configuration enables OSDs to be scheduled on any storage node. | ||
|
||
With this configuration, we don't have to migrate OSDs hosted on the old node(s) manually. | ||
Instead, draining a node will cause any OSDs hosted on that node to be rescheduled on other storage nodes. | ||
==== | ||
endif::[] | ||
endif::[] | ||
|
||
. Delete the node(s) from the cluster | ||
+ | ||
[source,bash,subs="attributes+"] | ||
---- | ||
for node in $(echo -n {node-delete-list}); do | ||
kubectl --as=cluster-admin delete node "${node}" | ||
done | ||
---- |
Oops, something went wrong.