the chances that Turkey will withdraw from NATO are significantly higher than the chances that NATO will kick Turkey out - both however are pretty slim. not only does Turkey like the security that NATO membership brings, NATO takes the view that Turkey nursing a grudge against NATO is going to be more dangerous, less predictable and more brutal/authoritarian than Turkey inside the fold. tent, pissing out etc...
that said, membership of NATO is a somewhat elastic concept. there are already huge differences in how different NATO members are treated by other NATO members with regards to information sharing and defence cooperation, and vast differences in how seriously and grudgingly different NATO members take their obligations - the term 'semi-detached' leaps to mind for a handful of NATO members, and 'completely out of view' probably applies to at least one...
relations with NATO have never, to my understanding and experience, ever been warm, but they have been close - now, and for many years, they've not been close either. Erdogan dislikes the limits that NATO membership puts him under, and its obvious that he massively distrusts other NATO states and possibly the NATO structures as well - personally however i don't think he wants to move out from under the NATO umbrella, particularly as this would free up the NATO states to persue the policies in the area they might like to, but are currently unable to so as to not undermine the security of a fellow NATO member.