I assume the type of paneling your referring to is tongue and groove paneling, not 4'x 8' sheet paneling.
The knots in pine and cedar have a high level of tannin in them, most of us have seen knots bleeding through paints. There is no primer that will hold tannin indefinatly, but there is one that will hold longer than others. BIN primer is, to my expirience, the best knot sealer out there. Unfortunatly, it's difficult to use. It sets up quickly, leaving you only about 15 to 20 seconds to get it brushed out. I ramble on.....
Wash the paneling with a strong cleaner and rinse it well with clean water. Allow to dry overnight. Sand the paneling with 100 or 120 grit sandpaper and clean up the dust with a damp sponge, then allow to dry again. While your sanding, watch closely to determine if a varnish or some type of finish was applied to the paneling, if no finish was used, your in luck, BIN primer will apply direcly over the wood. If a varnish was used then your better off using an "adhesion primer" such as Brunning's "Grabber Plus". Then spot prime over the knots with the BIN primer. Allow this to dry for a couple of hours and paint with whatever you wish. If I may suggest, use Benjamin Moore's Regal line of paint for your finish. They're excellent products.
If your painting sheet paneling, you can just omit the BIN primer and stick (no pun intended) with using the adhesion primer.