Annoying, isn't it? The resin in knots eventually bleeds through normal paints to create a stain. There's a stuff called ''knotting'' which has been used from Victorian times to prevent this. It's a shellac varnish which seals off the knots and stops the resin bleed-through. Dries in less than an hour. Two coats recommended. Available in brown and milky white, from DIY stores and most good hardware shops. Otherwise, Dulux do an aluminium-based primer that works well, (as Builder mentioned),on knots, and even on older bitumen and creosoted surfaces.