In May 2002 Vladimir Putin said Ukraine was entitled to decide on its own whether to join NATO and that he did not see such a decision as one that would “cloud” Russian-Ukrainian relations.
I think it's highly loaded to phrase this as NATO expansion. It sounds like NATO somehow coerced these countries into joining, or annexed them somehow. These countries came beating on NATO's door desperate to be let in. The instigating trigger for Putin's 2014 annexation of Crimea wasn't anything anyone in NATO said or did, it was the newly elected Ukrainian government's signalling that they wanted to join NATO.