Greetings, sorry about the pain. Knee joint is a special joint in that if not used frequently like not moving enough over a period of time knee starts to produce sounds as in your case. This is due to poor lubrication of knee joint. Not to worry.
Next Steps
ice the knee joint twice a day. get to see a physiotherapist specialised in trigger point therapy and posture correct your knee pain will be 50% relieved and start doing exercise as recommended by physio, if possible hire physio for 3 months to do exercise and your knee will become 100% pain free.
diet management also needs to be done to manage your weight.
Health Tips
if any questions do let me know or for any reasons if unable to get pain relief let me know will assist you.