digitalocean / doctl

The official command line interface for the DigitalOcean API.
https://docs.digitalocean.com/reference/doctl/
Apache License 2.0
3.26k stars 397 forks source link

node not deleted with kubectl delete #795

Closed silgon closed 4 years ago

silgon commented 4 years ago

Yesterday I created a node pool with the parameters min=1 and max=2. Since at the beginning they were 2 nodes, I decided to force deletion (instead of waiting automatic deletion), I did it with kubectl delete nodes name-38wa7 where name-38wa7 was the name of my alternate node.

You can see when you check on the command line that the node has been deleted:

$ kubectl get nodes
NAME              STATUS   ROLES    AGE   VERSION
name-38wam   Ready    <none>   15h   v1.16.6

However, today, just by chance I look into my user interface and to my surprise the other node was still up. image

Can you clarify why is this happening? As far as I understand, the second node is going to be created only as needed. I didn't have any processes in the cluster (I just starting configuring a couple of hours ago).

silgon commented 4 years ago

Update: after posting the message I decided to delete manually (with the web interface) the node name-38wa7 and the system just blocked. On the interface everything is frozen: image And my processing changed from running to pending: image Guys... I have the feeling that I'm troubleshooting the application. Help me out here. In any case I'll remove if I got another problem, I'll let you know.

andrewsomething commented 4 years ago

The DigitalOcean Kubernetes serivce does not currently support managing nodes directly with kubectl. Nodes are "owned" by DOKS, so all delete requests should go through the DOKS API/UI. You can do this via doctl with:

doctl kubernetes cluster node-pool delete-node <cluster-id> <node-pool-id> <node-id>

I've let the DOKS team know about your experience. Thanks for the feedback!