@senthil ganesh,
That is good.....ur first event and did a good job....knee pain as u mentioned it stops once u start walking....if that is the case u dnt hv to worry much....most Important aspect what u need to remember is u need to STRENGTHEN ur knee.....u can do that in two ways ONE is STRETCHING after every workout.....TWO is knee exercise with weight....Leg extention....one more without weight [sit on a chair......knee should come to the edge of the chair.....from knee u lift the leg up....upto horizontal to the ground and then bring it back.....like that do 20 times each leg...] this helps in strengthening of the knee....
10k run u really dnt need build ur endurance may be u can focus on pace/speed....keep all ur practice runs to 6 or 7 kms....focus on speed....
If possible introduce 1 or 2 days per week to strength training [working with weights] and 1 day HIIT [High Intensity Interval Training]
Let me know ur progress.....and if u hv any uncleared doubts.....have a happy RUN....!!!