DIY magnetic game board
There is no need to magnetise both the board and the pieces. Remember that magnets stick to iron, nickel and cobalt (and alloys comprised of these, e.g. steel). If you magnetise both the board and the pieces, then you risk making a mistake and the board repelling the pieces.

As mentioned in your chessboard example, the mechanics are that the pieces are hollow with a small magnet, and they are attracted to a thin sheet of metal placed under the wood. Depending on your pieces, gluing thin magnet strips may be a better option if making hollow pieces is going to be difficult.

The hardest part is testing the thickness of the board and strength of magnets to make sure that they stick as required, but are easy to move too. In this case you just have to experiment, but there are plenty of companies that produce magnets for miniatures. This site discourages specific product suggestions, but Googling something like "miniature magnets" will give lots of options.