diff --git a/pkg/util/provider/drain/drain.go b/pkg/util/provider/drain/drain.go index a2fd390e5..575170792 100644 --- a/pkg/util/provider/drain/drain.go +++ b/pkg/util/provider/drain/drain.go @@ -970,6 +970,13 @@ func (o *Options) getVolIDsFromDriver(ctx context.Context, pvNames []string) ([] continue } + // NFS volumes don't need to be attached to nodes only mounted, i.e., they won't appear in the + // node.status.volumesAttached section and there won't be any VolumeAttachments for it (as it's a built-in volume + // plugin, no CSI). + if pv.Spec.PersistentVolumeSource.NFS != nil { + continue + } + // Found PV; append and exit pvSpecs = append(pvSpecs, &pv.Spec) break