There were no NATO bases in Ukraine and could never be and Putin knew it. He knew it from 2008 when he attacked Georgia. You can't join NATO when you have a territorial dispute with a neighbour- a major part of why Russia took South Ossetia and Abkhazia off Georgia. And it was much closer to NATO membership than Ukraine. The annexation of Crimea plus the battle in Donbas, meant Ukraine couldn't join NATO anyway- unless it gave all that up which it would never do. But now Russia has an extra 1300km border with NATO with Finland.