I've had knee problems for years with my right knee (I think it was from messing around on skateboards when I was younger).
Anyway, the pain crops up from time to time and I have learned you really need to take ibuprofin and rest it for awhile because you will only make it worse (don't push yourself). When it starts feeling better you can work out supporting muscles to make up for your weakness--for me, I have to work out my inner thigh since my outer muscles are too strong and pull my knee outward. I just got into biking recently and thought I might have knee troubles again but it has only bothered me on longer trips. I know it is time to quit then because you can really screw it up if you push it. Pain is your body's way of warning you and always listen. A guy at work pushed himself on a long roadbike race and thoroughly screwed himself up...now he hasn't been able to ride in a year and is so sorry he didn't quit when his body told him to.
It sucks to curb yourself but it is far better than not riding anymore!