Krishna was cursed by the Gandhari that Lord Krishna will also lose all of his sons. And Lord Krishna accepted Gandhari curse and said Thathastu. After a few years, all sons of Lord Krishna had died because of their bad karmas with Rishies. Lord Krishna also left his physical body and then begin a new age i.e, Kali Yug.