The story
From knob + -er; the deer sense derives from the fact that a young buck's antlers begin diminutively as mere knobs; the fool sense derives indirectly from a reference to the penis; the two senses are ultimately cognate.
Etymology from Wiktionary, CC BY-SA 4.0.