Petersen was the only one dismissed on the day as he played one on to his stumps off Shardul Thakur.
India had won the opening Test in Centurion by 113 runs before the hosts bounced back in Johannesburg with a seven wicket victory.
The contest was seen as India’s best chance to win their maiden series in South Africa.
India: 223 and 198 all out.
South Africa: 210 and 212/3 for 3 in 63.3 overs. (Keegan Petersen 82, Rassie van der Dussen 41 not out; M Shami 1/41, Jasprit Bumrah 1/54).