I'm not sure I'd put it that way. Nobility was something you were born to, but knighthood had to be earned. Didn't some nobility go to the clergy rather than continue as knights? And especially later in the middle ages, a growing number of men simply stayed "squires" and did not bother to get knighted, since that involved a lot of expense.
Now and then a commoner could get knighted, generally for doing something spectacular on the battlefield. Most ended up kind of in limbo, not fully accepted by upper class or lower, as I understand it.
Yeah, OK, I didn't consider younger sons who went into the Church. Instead of noblemen I should have said men with noble titles. Kings had little use for a 'Duke of X' or an 'Earl of Y' if those men could not fight and lead men in battle. If one was born an oldest son and/or heir one went through the process of page, squire, and knight because that was the career path you were born into.