It sounds like patellar tendonitis, but it could be chrondromalacia patella or patellar malalignment. If you have not had knee problems before, then there are three likely causes - increasing your riding too quickly, pushing too hard a gear, or the cleats are not positioned correctly or the saddle is too low or too far back. Without knowing you or how you ride, my guess is that you are trying to do too much too quickly. If you cadence is less than 90, use an easier gear and spin faster. If your cadence is already 100, then you might have increased your distance and number of consecutive days riding too quickly.
First, make sure the saddle and cleats are in the proper positon. Then, backing off on either the gear or the duration and frequency of your rides (or both), stretching the hamstrings, quadriceps, IT band, and hip adductors after you ride (stretching before is of no benefit), and icing the knee after you stretch should help. Once you are pain free, then you should be able to slowly increase your workload. If these tips do not help, then you need to seek medical advice.