The only time my knees have hurt is when I get carried away and put too much weight on the squat rack. I've gotten smarter in my old age and capped the max weight I will ever do a squat or leg press with. Since then I'm fine.
Nothing about cycling has ever bothered my knees.