To my understanding karma is what you get when you don't do dharma.
I want to understand this with the example of Krishna, the very embodiment of dharma.
What did he do to get such seemingly bad karma, (being cursed and his sons killing each other) Did he do something adharmic in his past life, or up until the age of 16 when his guru's guru revealed to him what his destiny was?