Well, it is true that there is no duty to perform for those who meditates on the self:
3.17 But for that man who rejoices only in the Self, who is satisfied with the Self and who is content in the Self alone, verily there is nothing to do.
3.18 For him there is no concern here at all with performing action; nor any (concern) with nonperformance. Moreover, for him there is no dependence on any object to serve any purpose.
However it is instructed not to stop doing Karma due to LokaSamgraga:
3.20 For Janaka and others strove to attain Liberation through action itself. You ought to perform (your duties) keeping also in view the prevention of mankind from going astray.
Because others follow whatever learned and wise man does (verse 3.21) and if s/he stops doing work, people may be misguided due to not having right knowledge as explained by Adi Shankaracharya in his commentary on 3.21thth verse:
If you think that obligatory works were performed by the ancients such as Janaka ^because they were ignorant, If and that it does not follow from that fact alone that action should be performed by another ledge and has done to who his duties, all possesses right knowledge and has done all duties,- even then, as subject your prarabdha-karma (the karma which has led you this birth as a kshatriya), and to having regard also to the purpose of preventing the masses from resorting to a wrong path, you ought to perform action.
Also Lord Krishna incarnated to destroy evil and to establish Dharma so he done Karma to accomplish the objective:
4.8 For the protection of the pious, the destruction of the evil-doers, and establishing virtue, I manifest Myself in every age.
He himself explained what happens if he stopped doing Karma:
3.23 For, O Partha, if at any time I do not continue [Ast. and A.A. read varteya instead of varteyam.-Tr.] vigilantly in action, men will follow My path in ever way.
3.24 These worlds will be ruined if I do not perform action. And I shall become the agent of intermingling (of castes), and shall be destroying these beings.
That's why he did Karma and instructed to do so well:
3.25 O scion of the Bharata dynasty, as the unelightened poeple act with attachment to work, so should the enlightened person act, without attachment, being desirous of the prevention of people from going astray.