diff --git a/controller/node_controller.go b/controller/node_controller.go index 134bd26629..6be1621dc2 100644 --- a/controller/node_controller.go +++ b/controller/node_controller.go @@ -1635,6 +1635,9 @@ func (nc *NodeController) shouldEvictReplica(node *longhorn.Node, kubeNode *core } else if isDownOrDeleted { return false, longhorn.NodeConditionReasonKubernetesNodeNotReady, nil } + if kubeNode == nil { + return false, longhorn.NodeConditionReasonKubernetesNodeGone, nil + } if node.Spec.EvictionRequested || diskSpec.EvictionRequested { return true, constant.EventReasonEvictionUserRequested, nil