Sri Lanka lost their first four wickets in the first four overs and were reeling at 62 for six when Udana walked in to bat.
Miller was handed the wicket-keeping gloves in preparation for his likely role as Quinton de Kock's back-up in the World Cup.
The South African wicketkeeper-batsman scored one century and three fifties in the series against Sri Lanka and won the player of the series award
Markram batted with authority in sharing half-century stands with captain Faf du Plessis and Rassie van der Dussen
"Steve Rixon (fielding coach) will be the acting Head Coach of the National team during the T20 Series in South Africa," Sri Lanka Cricket said.
Udana apart, it was a dismal batting performance by Sri Lanka, marked by soft dismissals, with none softer than the run-out of Malinga.
Proteas team manager Mohammed Moosajee said Amla had asked for leave because his father was critically ill with Hendricks replacing the 35-year-old
JP Duminy also makes a comeback to the ODI squad following his return to domestic action with two half-centuries this month
Sri Lanka, chasing a revised target of 193 in 24 overs after a lengthy rain delay, made 121 for five as South Africa sealed the series 3-0
LPL draft: 8 Pakistan players picked, Gayle joins Kandy, Russell goes to Colombo
Abdullah Shafique gets maiden call-up; Sarfaraz Ahmed, Shoaib Malik dropped for Zimbabwe series
National T20 Cup: Three-way race to the last semi-final spot
Mohammed Siraj record spell sparks total capitulation of KKR
Misbah-ul-Haq quits as Pakistan chief selector, will continue as head coach
Umar Gul calls time on his professional career
PCB presents financial draft proposal to PSL franchise owners
Zimbabwe T20Is moved to Rawalpindi, PSL games to be staged in Karachi due to smog
Quaid-e-Azam Trophy: Hasan Ali, Ahmed Shehzad return, Yasir Shah named Balochistan captain
PCB issues warning after nine players and three officials violate Covid-19 protocols