Virat Kohli scored 135, a record-breaking 52nd ODI ton, as India defeated South Africa by 17 runs in the first ODI in Ranchi on Sunday.