Kubernetes-Master-Class
Kubernetes-Master-Class copied to clipboard
Longhorn Troubleshooting: Cleaning up deleted nodes
Longhorn Troubleshooting: Cleaning up deleted nodes
Even though I have deleted the nodes I added from Rancher UI, those nodes where still in Longhorn configuration. Hence, longhorn-manager where not able to schedule again because of that.
Here is the procedure I performed:
cloud@rebond-oks:~$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
winoks-rlk-eu-west-0a-master1 Ready controlplane,etcd 240d v1.18.10
winoks-rlk-eu-west-0a-worker1 Ready worker 240d v1.18.10
winoks-rlk-eu-west-0b-master1 Ready controlplane,etcd 240d v1.18.10
winoks-rlk-eu-west-0b-worker1 Ready worker 240d v1.18.10
winoks-rlk-eu-west-0c-master1 Ready controlplane,etcd 240d v1.18.10
winoks-rlk-eu-west-0c-worker1 Ready worker 240d v1.18.10
cloud@rebond-oks:~$ kubectl -n longhorn-system get [nodes.longhorn.io](https://nodes.longhorn.io/)
NAME READY ALLOWSCHEDULING SCHEDULABLE AGE
winoks-rlk-eu-west-0a-worker1 True true True 240d
winoks-rlk-eu-west-0a-worker2 True false True 6h38m
winoks-rlk-eu-west-0b-worker1 True true True 240d
winoks-rlk-eu-west-0b-worker2 True false True 6h33m
winoks-rlk-eu-west-0c-worker1 True true True 240d
winoks-rlk-eu-west-0c-worker2 True false True 6h46m
As you can see, I still have xxx-worker2 in longhorn nodes.
Then
cloud@rebond-oks:~$ kubectl -n longhorn-system delete [nodes.longhorn.io](https://nodes.longhorn.io/) winoks-rlk-eu-west-0a-worker2
cloud@rebond-oks:~$ kubectl -n longhorn-system delete [nodes.longhorn.io](https://nodes.longhorn.io/) winoks-rlk-eu-west-0b-worker2
cloud@rebond-oks:~$ kubectl -n longhorn-system delete [nodes.longhorn.io](https://nodes.longhorn.io/) winoks-rlk-eu-west-0c-worker2
then I redeployed longhorn-manager and everything is coming back well. Replicas are rebuilding.