This repository has been archived by the owner on Aug 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e23eea1
commit aa57247
Showing
1 changed file
with
25 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,41 @@ | ||
# Removing a node | ||
In this lab you will safely remove a node from the Openshift Cluster. | ||
|
||
|
||
``` | ||
$ oc get nodes | ||
``` | ||
|
||
## determine the node you want to remove, make it unschedulable | ||
|
||
``` | ||
$ oc adm manage-node <node> --schedulable=false | ||
``` | ||
|
||
## ensure it is correctly labeled as unschedulable | ||
|
||
``` | ||
$ oc get nodes | ||
``` | ||
|
||
## e.g. | ||
## ip-172-31-21-67.us-east-2.compute.internal Ready,SchedulingDisabled compute 10d v1.9.1+a0ce1bc657 | ||
|
||
``` | ||
ip-172-31-21-67.us-east-2.compute.internal Ready,SchedulingDisabled compute 10d v1.9.1+a0ce1bc657 | ||
``` | ||
|
||
## evacuate pods | ||
|
||
``` | ||
$ oc adm drain <node> --ignore-daemonsets --delete-local-data --force | ||
``` | ||
|
||
## check that the node has no running pods | ||
|
||
``` | ||
$ oc adm manage-node <node> --list-pods | ||
``` | ||
## delete nodes | ||
|
||
``` | ||
$ oc delete node <node> | ||
``` |