Knee pain is a very complex and varied problem. The first thing I would want to know is what is causing the pain. For this you need an evaluation by a competent doctor or doctor/phisiologist. Most often there is a misalignment that can be seen when one stands shoeless, with the feet parallel and hip width apart (about the same distance that classic bikes place the feet in pedaling (10 to 12 inches with the line drawn through the center of the feet). To test the alignment you bend the knees a bit until the heels just want to come off ground, and without leaning forward at all.. just a straight descent. At this point a knowledgeable assistant checks to see that the center of the knee is pressing over the same line as the feet, or in other words that the knee is over the center of the feet and not out to one side or another. The next thing to check is that while doing this, the arch from the ball of the foot to the heel is not collapsing and is pulled up. If the knee does not come over the exact center of the foot than it is likely that it doesn't when you ride either, and the cleat is properly set up. (If you use Looks or similar clipless, the cleat should be set up so that there is no spring pressure in the centered position) (If you use the older classic system with leather or plastic cleats than there is less room for error and the cleat needs to be nailed or screwed in so that the foot can be totally parallel. Of course placing the cleat too far forward with Looks or older systems puts too much strain on the knees also, as does placing the saddle so far back that the knee is too far behind the pedal axle. If the foot tends to roll in on the standing test you need to practice lifting the arch while doing shallow knee bends so that your foot will not roll in when you are on the bike pedaling either. A good yoga teacher will help you with all these things, while a bad one or a bad doctor will gloss over it.
Lastly you need to ease off a bit so that a minor injury can heal, and that you can evaluate the problem, because if you correct your alignment and have not healed a bit yet, the knee will continue to hurt even though everything is in line. Recently bike shops have been selling wedges to place in your shoe, and this is an item that is recommended by Carmichael and Armstrong. The wedge will help with riders that tend to roll inward in the long arch of the foot. A good bike coach will tell you that periodically you should hug the top tube with your knees and then let the knees swing out just a bit while riding so that the knees just miss the top tube by about an inch on each side. Riders that let their knees swing out from the top tube too much are indicating that the knees are not in line with the feet. The knee is a hinge joint and works best when there is no torsional action on it that is cause by foot problems, and the relation of the knee to the foot in alignment problems. The wrist pin of a piston would soon fail to if the cylinder were not exactly align with the piston arm's attachment to the crank. The knee is no different in that it allows for some misalignment but will fail if subjected to continuous strain for which it can not deal. More knee problems are related to bad walking or even running misalignment than bike related misalignment, and this is because for the most part using cleats properly set up and with the knee aligned tends to encourage good use of the joint rather than promote problems. Now cycling is more often plagued by upper back problems and lower back problems and problems related to the seat. For these issues a competent professional is also a good way to turn.
Garth Libre in Miami Shores Fl.