Did Lord Sri Krishna have a Guru in his life? At what age did he meet a Guru? Did he stay at his Guru's Ashram like Lord Sri Rama?
Lord Krishna's guru was Sāndīpani. It is said multiple times in the Bhagavatam. In Skandha 10 chapter 45, the activities Balarama and Krishna did were explained.
After getting the eligible age for education, both Balarama and Krishna were done upanayanam and took the vow of celibacy (Brahmacharya) which is necessary for a student.
After attaining twice-born status through initiation, the Lords, sincere in Their vows, took the further vow of celibacy from Garga Muni, the spiritual master of the Yadus. (SB 10.45.29)
After getting upanayanam, they went to Sāndīpani muni for education.
Concealing Their innately perfect knowledge by Their humanlike activities, those two omniscient Lords of the universe, Themselves the origin of all branches of knowledge, next desired to reside at the school of a spiritual master. Thus They approached Sāndīpani Muni, a native of Kāsī living in the city of Avantī. (SB 10.45.30-31)
Similarly, Vishnu Purana also says Krishna and Balarama studied under Sāndīpani.
The two excellent Yadu youths, versed in all knowledge, and possessed of all wisdom, then submitted to instruction, as the disciples of teachers. Accordingly they repaired to Sándípani--who, though born in Káśí, resided at Avanti--to study the science of arms, and, becoming his pupils, were obedient and attentive to their master, exhibiting an example to all men of the observance of instituted rules. In the course of sixty-four days they had gone through the elements of military science, with the treatises on the use of arms, and directions for the mystic incantations, which secure the aid of supernatural weapons. (Amsha 5 Chapter 21)
They both lived in the ashrama like normal students. It is where Lord Kṛṣṇa met Sudāmā.
Lord Kṛṣṇa remembers an incident during their school days when Sudāmā visits him.
O brāhmaṇa, do you remember what happened to us while we were living with our spiritual master? Once our guru’s wife sent us to fetch firewood, and after we entered the vast forest, O twice-born one, an unseasonal storm arose, with fierce wind and rain and harsh thunder. (SB 10.80.35-36)
Our guru, Sāndīpani, understanding our predicament, set out after sunrise to search for us, his disciples and found us in distress. (SB 10.80.39)
After completing the education, they offered their guru-dakṣiṇā by bringing their master's son back to life which I have discussed in one of the answers of mine which is about resurrections in Hinduism.
Sri Krishna had many Gurus in his life.
First was Garga Muni who initiated him (and also Balarama) into the Gayatri Mantra. Then he went to his Guru Sandiapani Muni's house for the Gurukula Vasa. (stay at the Guru's house).
As mentioned in this chapter of the Brahma Vaivarta Purana:
Garga Muni performed Upanayana (Initiation to Gayatri Mantra) of Balarama and Krishna, the latter underwent formal Gurukula Vaasa or residential education at the house of Sandeepani and as a Guru Dakshina brought the dead son of their Guru and his wife back to life! Dwaraka Nirman: On return from Guruvaasa, Krishna, and Balarama returned to Mathura and planned the construction of Dwaraka puri. Krishna remembered Garuda Deva, Ksheera Sagara, and Devas Architect Vishwakarma.
Similarly from the Vishnu Purana:
Since Kamsa was now dead, it was time for Krishna and Balarama to go to their guru’s house for studying. Their guru was a sage named Sandipani, who lived in Kashi. There Krishna and Balarama went to learn amongst other things, the art of fighting. It took them only sixty-four days to learn all this. After the shishya’s studies are completed he has to give a Dakshina to his guru. Sandipani’s son had died and as a guru Dakshina, Sandipani desired that his dead son might be brought back to life.
After death, the sage Sandipani’s son had gone to the great ocean. Krishna and Balarama took up their weapons and went to the ocean to demand the son.
Then, for obtaining sons, Sri Krishna took a particular Shiva Mantra, called the Pashupata Mantra, from another Guru, and did a penance.
28-29. On seeing Rukminî’s many sons, Pradyûmna and others, all qualified with diverse qualifications, His wife Jâmbavatî prayed to S’rî Krishna with humility, so that she may have also many beautiful sons. For her sake, Krishna firmly resolved to practice tapasyâ and went to the place where the great devotee of S’iva, Upamanyu, was staying. 30. Hari desiring to have sons engaged Upamanyu as His spiritual guide and obtained from him the Mantram called Pâs’upata Mantra and became a Dundee (holder of a staff) and shaved His head. 31-32. In the first month He subsisted on fruits only and meditated on S’iva and repeated silently the S’iva mantra. Thus He practiced very severe austerities. In the second month He subsisted on water only and stood on only one leg. In the third month, he lived on air only and stood on the end of His great toe.--- Devi Bhagavatam Book 4, 25th Chapter
So, Upamanyu was also his Guru for this Diksha.
Further, in the Vaishnava Tantric text called the Radha Tantram, it's stated that Sri Krishna took a Devi Mantra called the Tripuaramba Mantra from Lord Shiva himself. So, for this Diksha, Lord Shiva was his Guru.
I'll try to locate the exact chapter no. of Radha Tantram, where this incident is mentioned.
The incident of Sri Krishna receiving the 4-lettered Mantra is found in the 1st Patala (or chapter) of the Text itself.
Bhrigu bijam samudhritya kumudvatim |
Indra bijam tato devi tadante vikata parA || 13
VAsudevohapitam srutvA drutam kAshi puram jajau |
Yatra kAshi mahAmAyA nityA yoni swarupini ||
SA kAshi paramArAdhyA brahmAdyai parishevitA | 14
Where, in verse 13 the Mantra Sanketa has been described and the verse 14 roughly says this:
Upon hearing the Mantra Krishna immediatedly went to KAshi (where he did the required UpAsana). KAshi which is eternal and of the form of MahAmAyA and the Yoni, and which is always being served by Brahma and other Gods.
Radha Tantram Patala 1.