Related question: [Question] Delete nodes in v1.10 · Issue #2267 · longhorn/longhorn · GitHub
Longhorn v1.1.0 node will be removed automatically when the related Kubernetes objects are deleted from the cluster. Hence there are 2 options to delete the node from Longhorn:
- Delete the related Kubernetes node objects if they still exist in the cluster. You can check the nodes first and see if it’s safe to delete them:
kubectl get node
,kubectl delete node <node name>
- Or directly delete the Longhorn node objects:
kubectl -n longhorn-system delete nodes.longhorn.io <node name>
Hi, thanks, my issue was resolved by this.
Background:
Previously, my one node need to be “force deleted” from rancher because this node is failed when I upgrading kubernetes version from rancher UI. The kubernetes node was deleted successfully from the rancher UI.
There are still 2 volumes failed in that node (because I just set it into single replica), and for some reasons, longhorn didn’t delete the node automatically (I assume this is caused by the failed volume?)
What I was doing:
I delete the problematic pod using the failed volume, and then delete the PVC. The volumes were deleted successfully in longhorn UI, but the deleted node
was still appear in the longhorn UI, and I couldn’t find any delete node
option in longhorn-frontend:80/proxy/#/node
page. And also, the Edit Node
button was disabled. I just found disable scheduling
for the failed node without any effect
I have 3 feedback related to this
- If we are allowed to delete
nodes.longhorn.io
from cli, why is there no option to do that from the UI? - I didn’t see this solution on the docs site, from version 1.0.0 until 1.1.1. I expect it will be appear in here
- If my assumption about
the node still appear on the UI because of the failed volume
is true, is it possible to see this explanation in the UI? I also expect something likenodes.longhorn.io
will be automatically deleted because the node was also already deleted fromkubectl get node
anyway
Thank you!