The only time I had knee pain was in 1978 when I had a Raleigh International that was set up too tall for me. I lowered the saddle and started spinning instead of mashing tall gears all the time and the knee pain went away. A good careful fitting and properly sized components goes along way.
Bill