Upamanyu born in a poor family who could not provide him milk was encouraged by his mother to worship Lord Shiva who was the only one who could give him milk.
She explained the child about the greatness of Lord Shiva.
The child got his mind filled with devotion for Lord Shiva and went for a penace to obtain the blessings of his Lord.
Inspite of many hurdles the boy didn't stop chanting Panchakshari which gave him great strength.
At last after being tested by his Lord he was blessed with the greatest boons one could get and was accepted as the beloved son of his Lord Ksheeraramalingeswara who gave him Ksheerasamudra.
When Lord Ksheeraramalingeswara asked the boy to get another boon he wished, the boy out of his pure and innocent devotion towards his Lord , replied to bless him with complete devotion and Shivasaayujya(close relation with him).
Happy with his request Lord stayed there with Maa Paarvathi in Ksheerapuri(palakollu).
Clear and complete info can be viewed at Story of Maharshi Upamanyu