The left-hander dug in admirably alongside his captain De Villiers - and enjoyed some fortune when he was dropped on 37 and 43 - as the pair added 171 for the fourth wicket to put South Africa back in charge.
De Kock passed the 330 runs by New Zealand's Martin Guptill in a three-match series against England this year, and joined Zaheer Abbas (1982), Saeed Anwar (1993), Herschelle Gibbs (2002) and De Villiers (2010) on the list of batsmen to score three one-day hundreds in a row.
Sharma ended the knock when he bowled De Kock with a slower ball, but he could not stop South Africa from taking 45 runs in the batting powerplay.
De Villiers struck five sixes in his 101-ball innings, and after he was trapped lbw by Umesh Yadav, David Miller took over the six-hitting responsibilities.
Miller struck three sixes in his unbeaten 56 off just 34 deliveries, as a couple of late wickets for Mohammed Shami (3-69) failed to prevent South Africa from reaching the 300-run mark.
That put South Africa in a strong position to record a series whitewash, but the inclement weather ensured it was not afforded the opportunity to do so.
The two teams now turn their attention to the two-match test series, which gets underway at the Wanderers next Wednesday.
-AP