Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Commit

Permalink
Update removing_node.md
Browse files Browse the repository at this point in the history
  • Loading branch information
christianh814 authored Oct 2, 2018
1 parent e23eea1 commit aa57247
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions removing_node.md
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>
```

0 comments on commit aa57247

Please sign in to comment.