Ride a bike to keep fit, and stand up and pedal your knees when going uphill, okay?
As the former replied, it is relatively true that it hurts the knee a little more than normal riding. To avoid hurting your knees when riding a bike (in any case, riding a bike hurts your knees less than running).
Suggest 1, and use an appropriate sitting height; 2, in the case of uniform speed, use easy gear, improve the frequency of stepping, generally recommended 80 times a minute, if there is no speed change, there is no way to avoid stepping hard.