Whitelock is the All Blacks' most capped lock with 84 appearances since his debut against Ireland in 2010.
The 28-year-old dual-world-cup winner has established himself as one of New Zealand's premier locks alongside Chiefs big man Brodie Retallick in the black jersey.
Whitelock said staying in New Zealand was an easy decision.
"When I considered whether my immediate playing future was here in New Zealand and Christchurch, I didn't need to look far for the answer.
"My wife Hannah and I have recently welcomed a new addition to our family, I am still genuinely excited to be playing rugby for these teams, and I feel like there is still plenty more to achieve," Whitelock said.
All Blacks coach Steve Hansen said keeping Whitelock was a big boost to the All Blacks frame.
"On behalf of New Zealand Rugby, as well as all New Zealand rugby fans, I want to congratulate Sam and his wife Hannah on his decision.
He's a world-class lock and together with Brodie Retallick forms one of the best international locking partnerships in world rugby at present," Hansen said.
"Sam is also great contributor to our environment: he thinks a lot about the game, is a flexible thinker, leads very well within the group and has become a very, very important component in the All Blacks. Once again, it's great to have another one of our key men re-sign with New Zealand Rugby".
Photo: PHOTOSPORT New Crusaders captain Sam Whitelock.