After Kallis signed off in Test cricket with 115, Peterson hit nine fours and a switch-hit for six in his lively 61 off 52 balls and South Africa was 500 all out early in the day's final session at Kingsmead.
Peterson shared a stroke-filled 110-run stand with Faf du Plessis (43) as South Africa scored quickly in an attempt to give itself a chance of a victory with just over a day left in veteran allrounder Kallis' 166th and final Test.
Kallis earlier was hugged by most of his teammates following what's likely his final innings in Test cricket, when he batted for over six hours for his 45th Test hundred. He also moved up to third on the list of all-time Test run-scorers - by a single run.
South Africa's most successful batsman ever went to three figures with a nudge to mid-on and celebrated by removing his helmet and lifting both arms in the air as he faced the team dressing room. He was out to spinner Ravindra Jadeja, who had a career-best 6-138 in India's flagging bowling attack.
India made 334 in its first innings of the final Test. In the second innings the visiting team scored 68/2 before bad light stopped play again.
As Kallis walked off waving his bat to the crowd, members of the South African team came out of the dressing room and down the stairs toward the field to hug him one by one. Captain Graeme Smith kissed the 38-year-old allrounder on the side of the head and then carried Kallis' bat and gloves into the changing room.
Kallis' century also took him past Rahul Dravid and up to the third-highest run-getter in Tests behind India's Sachin Tendulkar and Australia's Ricky Ponting. He needed exactly 115 in his last Test before retiring to overtake former India batsman Dravid.
Top-ranked South Africa took charge of the series-decider against No. 2 India with Kallis' anchoring innings at the same ground in Durban where he made his debut as a 20-year-old prodigy in 1995. After South Africa slipped to 113-3 on the third day, he had successive partnerships of 127 with AB de Villiers (74), 58 with JP Duminy and a stand of 86 with nightwatchman Dale Steyn, who made 44.
Peterson then unleashed a flurry of boundaries against the new ball after lunch, and Du Plessis also chipped in with four fours before he was run out for 43 by a direct hit from Rohit Sharma.
Morne Morkel was caught and bowled by Jadeja for a duck to end the South African innings and give the slow left-armer his best return in Tests.
Straight after passing Dravid and going to 13,289 career Test runs, Kallis had attempted a big heave to the legside off Jadeja and top-edged to wicketkeeper Mahendra Singh Dhoni for the first wicket of the day. Kallis faced 316 balls and hit 13 fours in an innings that began early on Saturday morning.
Jadeja continued to be India's main threat and bowled a marathon 58.2 overs in South Africa's first innings for his six-wicket haul. Seamer Zaheer Khan had India's other two wickets on the fourth day when Steyn, trying to clatter an eighth boundary, edged behind to Dhoni three overs after Kallis had gone.
Peterson skied a catch to Murali Vijay at mid-on off Khan to end an entertaining and sometimes fortunate knock and Du Plessis was run out in a mix-up with Vernon Philander as South Africa's innings ended quickly after tea.
Kallis announced on Christmas Day that it would be his final Test, taking many by surprise to end the career of South Africa's most successful batsman ever and one of the game's outstanding allrounders. He said he would remain available for limited-overs internationals in an attempt at a final swansong at the 2015 World Cup.
Kallis goes past Dravid, becomes 3rd highest Test run-getter
Kallis on Sunday surpassed Rahul Dravid as the third highest run-getter in Test cricket after a 115-run knock.
Kallis, who would be retiring from Tests at the end of the ongoing second and final game against India, now has 13,289 runs in the longest format.
That tally is one run more than Dravid, who retired last year after playing 164 Tests. Kallis, who is playing in his 166th Test, is now third behind Sachin Tendulkar (15,921) and Ricky Ponting (13,378) in the all-time list.
The South African, considered the best all-rounder in modern cricket, struck a fluent 115-run knock today, which came off 316 balls and included nine fours, in his final Test.
"Hail King Kallis!Even his worst critic wudn't begrudge JK farewell ton-truly fantastic feat V normally relate 2 dreams!!" tweeted former Indian captain Bishan Singh Bedi, paying tribute to the 38-year-old.
"Handsome is that handsome does!Is thr any1 more handsome than Kallis in his final test?No 1 took so much workload as JK in last 3/4 decades!" he added.
Besides the mountain of runs he sits on, Kallis also has 292 wickets in Tests at an impressive average of 32.53, besides having 200 catches to his credit.
"100 for #Kallis in his last test. One of the greats," wrote New Zealand captain Ross Taylor.
"LEGEND ... #Kallis #GreatestEverAllrounder. #SAvInd," tweeted former England captain Michael Vaughan.
Scoreboard at lunch on the fourth day
India first innings 334
South Africa first innings (299-5 overnight)
G. Smith c Dhawan b Jadeja 47
A. Petersen c Vijay b Jadeja 62
H. Amla b Shami 3
J. Kallis c Dhoni b Jadeja 115
AB de Villiers c Kohli b Jadeja 74
JP Duminy lbw Jadeja 28
D. Steyn c Dhoni b Khan 44
F. du Plessis not out 5
R. Peterson not out 5
Extras (lb-10, w-1, nb-1) 12
Total (for seven wickets, 140 overs) 395
Fall of wickets: 1-103 2-113 3-113 4-240 5-298 6-384 7-387
Still to bat: V. Philander, M. Morkel.
Bowling (to date): Z. Khan 25-4-75-1 (w-1, nb-1), M. Shami
23-2-72-1, I. Sharma 27-7-88-0, R. Jadeja 55-15-128-5, R. Sharma
(Inputs from IANS, REUTERS and PTI)
Live Commentary, India Second Innings:
Live Commentary, South Africa First Innings: