Namibia had opened the scoring with a penalty in the 3rd minute, and held the All Blacks to a 10-9 lead after the first half hour, but two late tries in the half stretched the lead to 24-9 at half time.
The All Blacks had scored tries to Sevu Reece in the 7th minute and Anton Lienert-Brown in the 21st minute, but a competitive Namibia had unsettled them around the ruck.
Prop Nepo Laulala was sin-binned in the 30th minute for a swinging arm that made contact with the head, but quick tries from replacement prop Angus Ta'avao in the 36th minute, and full back Ben Smith four minutes into extra time put Namibia on the back foot.
The second half opened with a try to prop Joe Moody in the 42nd minute, and was followed by another from Anton Lienert-Brown in the 46th minute.
Namibia was starting to look tired, and there were further tries to Sevu Reece in the 52nd minute, Sam Whitelock in 56th minute, and Ben Smith in the 67th minute.
The All Blacks had their second yellow card of the match in the 73rd minute when prop Ofa Tu'ungafasi was sin-binned for making contact with the head in the tackle, but with 14 men they managed to score two more tries to Jordie Barrett in the 76th minute, and replacement TJ Perenara in the 79th minute.
The All Blacks remaining pool match is against Italy next Saturday at 5.45pm NZT.
New Zealand: 71
Tries: Sevu Reece 2, Anton Lienert-Brown 2, Ben Smith 2, Angus Ta'avao, Joe Moody, Sam Whitelock , Jordie Barrett, TJ Perenara.
Conversions: Barrett 8