Chapter 3 Verse 22

न मे पार्थास्ति कर्तव्यं त्रिषु लोकेषु किंचन ।
नानवाप्तमवाप्तव्यं वर्त एव च कर्मणि

na me parthasti kartavyam trisu lokesu kincana
nanavaptam avaptavyam varta eva ca Karmani

partha – O Arjuna
me – for me
kartavyam – to be done
na – not
asti – is
trisu – in the three
lokesu – worlds
anavptam – not yet gained
avaptavyam – to be gained
kincana – anything
na – not
ca – yet
Karmani – in action
eva – indeed
varte – I remain engaged

Partha (O Arjuna), For me, there is nothing to be done in the three worlds and there is nothing to be gained by me that I have not yet gained. Yet, I remain engaged in action.

Krishna says in this verse as to why he is performing action when he himself is the lord and he is above all karmas and nothing binds him. So what is the reason for him to ride Arjuna’s chariot and give gita pravachan. The expression trisu lokesu should be taken as all the lokas, the entire universe and any others that exist as well. He has no duty bound in any way.
So Krishna here was no ordinary person and we all know that. Yet he was driving Arjuna’s chariot. He was the kind of yadavas, the king of Dwaraka but he did not consider driving the chariot a mean job. If it was not for driving the chariot, he would have been fighting a war with his narayani sena or playing flute or just relaxing etc. Even though he had agreed not to support both the parties, yet he felt the need to uphold dharma and hence offered whatever both the parties wanted i.e. Duryodhana and Arjuna. Because of that thought to bring dharma back, he took the action and did the mediator role as well when he went to Duryodhana and asked for a last minute think to stop the battle. So he performed all these actions while he and everyone knew that Vasudeva is none other than Narayana himself. So when Arjuna asked to teach him saankhya and karma yoga, he did that as well.

So why did Krishna being the ishwara still engage in action when he did not have to do any activity?. We will see this in the next verse.