As high on the leg as humanly possible. It's just like an armbar -- you want to lock the joint in as deep as you can past your hips, you don't want to have your hips right next to the joint (too easy to escape/lose leverage). The big battle for the kneebar is to get it fully extended and locked. Once that happens, he has little chance of getting out unless he wants to go through some serious pain.
The way you lose the kneebar, he usually kicks off your butt and forces your hips to low on the leg to finish. So the higher you have the hips, the harder it is for him to get out. It's very easy to move hips down the leg towards the knee, very hard to come back up when you've gone too far.
And yeah, you need recounters if you want to have good luck with the kneebar. Either hit him with a calf slicer or (if he is triangling his legs) drop a toe hold bomb on his blocking foot.