Setting a PWM frequency between 1Khz and 10Khz

Hello, I need a clock pulse that can vary between 1Khz and 10Khz. I read here on the forum buy changing the Timers prescalers. But is this the way to go? I want to vary the clock speed with a Pot.

thanks Ronald