You may be having some inflammation of the patellar (knee cap) tendon or of the bursa on that area. A bursa is a sac around the joints, ligaments and tendon that helps decrease friction on these areas. Running and walking downstairs only involves half-bending your knee, so these structures are only partially stretched. When walking upstairs, the knee is bent fully and the movement is repetitive, and most of your weight will be on your knee; this fully stretches the inflamed structures that is why there is pain. You may apply ice on your knees for 15 minutes 3-4x a day and see if it helps, or probably take some Ibuprofen (Advil) if the knee pain is untolerable. Immobilizing your knee may also help. I do hope I have answered your question and take care always.
These Q&A’s are for educational purposes and should not be relied upon as a substitute for medical advice you may receive from your physician. If you have a medical emergency, please call 911. These answers do not constitute or initiate a patient/doctor relationship.