Do you have any pain or burning? If so, it could be an infection.
Is the knee swelling? Is the pain on the inside to back side of the knee? I have had years of kidney stones which can make your knees to legs swell. There are more questions to determine if a kidney stone. It is just one option that could give the two symptoms you mentioned.