Whenever the question of Karma Yoga comes up, eventually the example of King Janaka comes up. He was a respected and much honored king in the time of the Avatarhood of Sri Rama and was the father of Sita, Rama’s wife who was the lynch-pin of the activity for which Rama and his 3 brothers took birth, the destruction of the 10-headed Ravana who gained enormous demonic powers and was wielding them to gain mastery over the three worlds.
King Janaka was known as someone who had achieved realisation through Karma Yoga and continued to occupy his position “for the good of the people”. He acted without personal motive of fame or fortune. This is a perfect example and is raised by the Gita to illustrate the ideal of action once realisation has been attained.
Sri Aurobindo underlines this point: “So Janaka and other great Karmayogins of the mighty ancient Yoga attained to perfection, by equal and desireless works done as a sacrifice, without the least egoistic aim or attachment…. So too and with the same desirelessness, after liberation and perfection, works can and have to be continued by us in a large divine spirit, with the calm high nature of a spiritual royalty.”
The third chapter of the Gita is particularly focused on this subject in verses 20-26. Sri Aurobindo quotes as follows: “As those who know not act with attachment to the action, he who knows should act without attachment, having for his motive to hold together the peoples. He should not create a division of their understanding in the ignorant who are attached to their works; he should set them to all actions, doing them himself with knowledge and in Yoga.”
Sri Aurobindo, Essays on the Gita, First Series, Chapter 14, The Principle of Divine Works, pp. 127-128