The knots in bare wood should always be treated with knotting - this is a shellac based solution which prevents the sap in the knots from bleeding through future paint films and staining them with brownish marks.
Applying knotting solution
The knotting should be applied with a small old brush or rag to completely cover the knot, overlapping it a little.
The knotting dries very quickly and can be overpainted as soon as it’s dry. Obviously this shouldn’t be used if you plan to varnish the wood, as it is a coloured solution.
Use methylated spirit to clean shellac brushes
Stains and bleeding
Other stains which are liable to bleed through paint can be sealed using knotting. Try it for covering pen marks.
When using methylated spirit avoid skin and eye contact. Always ensure adequate ventilation.