The Ukraine NATO talks were the direct precursor to the Crimea invasion and were ongoing before that. Russia has black sea navy assets in Crimea and per NATO, Ukraine couldn't support Russian military assets in the country while simultaneously joining NATO. Russia needs them there, so they took Crimea proactively to preserve their naval position in the event Ukraine joined NATO.