Epoxy is great for filling cracks and knot holes in wood because it's strong and waterproof. But not all epoxies are right for this job. It's important to choose a low-viscosity epoxy that will seal cracks and fill knot holes.
To fill hairline cracks and pinholes, use TotalBoat Penetrating Epoxy.
To fill larger holes and gaps, check the manufacturer's directions regarding how deep you can fill in one application, because not all epoxies can be used to fill larger voids. Some examples of two-component low-viscosity epoxy products for filling cracks and knot holes are TotalBoat High Performance Epoxy, West System 105 Epoxy, and MAS LV Epoxy.
If your application is cosmetic and you want the filled holes and cracks to show, you can either leave the mixed liquid epoxy clear, or color it with epoxy-safe coloring agents such as alcohol inks and mica powder pigments. The examples below used TotalBoat High Performance Epoxy with Black Diamond Pigments mixed in.
Using a syringe to fill small holes
Pouring to fill larger cracks and knot holes
Most epoxies are not UV-stable, and are not meant for surfaces that will receive continuous UV exposure. You will need to coat the cured epoxy over cracks, knot holes, and flat wood surfaces with a UV-filtering varnish to prevent deterioration, clouding, and yellowing.