How to properly remove a node from cluster

Find your node then drain it to let k8s reschedule pods and avoid future schedule on this node:

kubectl drain <node-name> --ignore-daemonsets --delete-local-data

Then you’ll fine label on this node.

Delete node from cluster.

kubectl delete node <node-name>

Then everything k8s related will be removed, and you’ll only see this left on node:

t login: Fri Dec  6 05:25:27 2019 from
[email protected]:~# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[email protected]:~# docker images
REPOSITORY                                    TAG                 IMAGE ID            CREATED             SIZE
rook/ceph                                     v1.1.6              510cbf40e73e        4 weeks ago         974MB
rancher/rancher-agent                         v2.3.2              87468cfad9b5        5 weeks ago         288MB                       v1.2.1              4ed9912287b5        2 months ago        984MB
ceph/ceph                                     v14.2.4-20190917    c54ba73cca7b        2 months ago        895MB   1.15.5              b477eb2ed326        3 months ago        62.5MB           v1.15.3             232b5c793146        3 months ago        82.4MB
weaveworks/weave-kube                         2.5.2               f04a043bb67a        6 months ago        148MB
weaveworks/weave-npc                          2.5.2               5ce48e0d813c        6 months ago        49.6MB
prom/node-exporter                            v0.18.0             3a6e851e4dc2        7 months ago        22.9MB      v1.1.0              a93898755322        7 months ago        15.8MB
nfvpe/multus                                  v3.2.1              4aed35b3b768        8 months ago        500MB
busybox                                       1.29.3              758ec7f3a1ee        11 months ago       1.15MB
guacamole/guacamole                           1.0.0               619d434a3003        11 months ago       491MB
guacamole/guacd                               1.0.0               57f6ce568e0d        11 months ago       395MB          3.1                 da86e6ba6ca1        23 months ago       742kB
mysql                                         5.7.14              4b3b6b994512        3 years ago         385MB