I recently had knee problems on my left leg, where my right is dominant.
It was just under the knee cap, more the patella area. Since it is the left leg, it would also hurt more when strained when getting in and out of a car (or lower than SUV vehicle)
What I discovered is that my cleats were positioned where my toe would be pointed too much inward. Where I thought this was better to keep them knees against the top tube, turns out, it made for poor knee/toe alignment. Even when facing a mirror on the spin bike, my knee appeared straight, and aligned, but it was actually just toeing in that caused a flare up.. It would be worse after working on climbs or out of saddle drills.
I also have really flat feet and pedalling hard for a few years only seemed to flatten out my arches even more so. Keep your toes pointed more forward and see what happens.
I was getting this on my track bike with SPD's and they have quite a bit of float and I thought that would have negated any need to adjust, but afterwards, my knee problems subsided.
g;luck