Run a scraper across the knots. If there's resin residue, remove it by scraping and washing with trisodium phosphate (TSP) or multi-purpose detergent. Allow it to dry thoroughly.
Sand the wood lightly with 120- or 180-grit sandpaper. Wipe it clean with a damp rag.
Prime the knots with tinted shellac or oil-based (alkyd) primer. If there are just a few knots to seal, use an aerosol spray can of primer. Allow it to dry according to label directions. Most fast-dry oil or shellac primers can be top coated within an hour.
Paint the wood with two coats of alkyd or latex paint, allowing 4 to 8 hours of drying time between coats.