Karmas don’t bind you, it is attachment to karma and its fruits, that does.
Kim Karma Kimakarmeti Kavayo-apyatra Mohitaah, Tatte Karma Pravakshyaami Yajgyaatvaa Mokshyase-ashubhaat
(What is action? What is inaction? These questions puzzle even the wise. Therefore, I will reveal to you the truth of karma, knowing which you will be free from its bondages)
— Lord Krishna in Bhagwad Gita, Chapter 4, Verse 16
It is actions motivated by results that tie us to the physical, unreal and temporary creation and related experiences of pain and pleasure. He who gives up the attachment to fruits of action and is ever content, does nothing at all, though fully engaged in action. Then it does not matter, whether he is sitting on the Himalayas or leading a family life. Karmas don’t bind you, it is attachment to karma and its fruits, that does.
Let me illustrate this with an example. Ram Krishan Paramhans led the life of a householder and would ask his wife to prepare sumptuous meals for him. His wife once asked him, “Why did he indulge in sweets when his was a life of vairagya.” He replied, “My task in this body is not over yet. To stay in the body (physical creation), I need to indulge. When the day comes for my exit, three days before, I will stop eating.” He did exactly that. Ram Krishan Paramhans had cancer. But he welcomed the pain, in the same spirit, as he took food. He got operated without taking anesthesia. He was in vairagya (a state of detachment). He did what he did with detachment to both pain and pleasure, fixing himself on the path of his guru. He was neither carried away by the pleasures that came his way nor did he fret about pains.
Paramhans was a gyani. He knew, what has to happen, happens and that the exit route is nishkaam karma or vairagya. Whatever we have done we have to pay for it. That is our karma. Even Ramkrishna Paramhans had to go through cancer, despite all the good deeds that he did. It was his karma and so it happened, but what differentiates him from an ordinary man is the state of vairagya he was in. Carry out your task without thinking about the result it will yield. You cannot change what has to happen but if you follow the path of nishkaam karma, you rise above their effect.