- Yes Lord Krishna knew he was an avatar of Lord Vishnu.:
Listen, O Partha, to this secret and ancient history as it is, O sinless one! I have four forms, eternally engaged as I am in protecting the worlds. Dividing my own Self, I ordain the good of the worlds. One form of mine, staying on the earth, is engaged in the practice of ascetic austerities. Another beholdeth the good and the evil deeds in the world. My third form, coming into the world of men, is engaged in action. My fourth form lieth down in sleep for a thousand years. The form of mine which awaketh from sleep at the end of a thousand years, granteth, upon awakening, excellent boons to persons deserving of them.
- MBH Drona Parva Section 27.
- I think my 1st verse only answered this still here another one. Lord Vishnu always rwmains in Vaikuntha even after taking avatars.
"The blessed Krishna continued ... I stood all the while, supporting myself upon one foot and with my arms also raised upwards, and foregoing sleep all the while I then beheld, O Bharata, in the firmament an effulgence that seemed to be as dazzling as that of a thousand Suns combined together. . . . The puissant Indra, Bhagawan Vishnu, the sons of Aditi, and the Grandsire Brahma, all uttered, in the presence of Bhava, the Rathantara Saman.
- Mahabharata , Anushasana Parva, ie., In Book 13, Chapter 15 verses 1 to 51.
- "I" in the Gita is the Antaryami of Krishna.:
‘Vasudeva said, ‘I made thee listen to truths that are regarded as mysteries. I imparted to thee truths that are eternal. Verily, I discoursed to thee on Religion in its true form and on all the eternal regions. It is exceedingly disagreeable to me to learn that thou didst not, from folly, receive what I imparted. The recollection of all that I told thee on that occasion will not come to me now. Without doubt, O son of Pandu, thou art destitute of faith and thy understanding is not good. It is impossible for me, O Dhananjaya, to repeat, in detail, all that I said on that occasion. That religion (about which I discoursed to thee then as gita) is more than sufficient for understanding Brahma. I cannot discourse on it again in detail. I discoursed to thee on Supreme Brahma, having concentrated myself in Yoga’”. (MBH 14:16:5-13a).
The blessed Krishna said, 'Bowing my head with great joy unto that mass of energy and effulgence, I said these words unto the great Bhagavan Shiva, with a heart filled with gladness,--
- Firmness in virtue, (dharme dṛḍhatvaṃ)
- The slaughter of foes in battle,(yudhi śatrughātaṃ)
- The highest fame,(yaśas tathāgryaṃ )
- The greatest might, (paramaṃ balaṃ)
- Devotion to Yoga, (yogapriyatvaṃ)
- Thy adjacence, (ava saṃnikarṣaṃ) and
- Hundreds upon hundreds of children, (vṛṇe sutānāṃ ca śataṃ śatāni)
these are the boons I solicit of thee,--So be it,--said Sankara.
- Mahabharata, Anushasan parva Book 13, chapter 16, Verses 1 to 3.
“That Vishnu who knows every thing, who has greatest qualities, who cannot be won over by anybody, who has special holy sight, and who is greatly resplendent, always sees and remains connected (viz meditate on) him (Rudra) by his eyes of yoga”. (MBH 13:14:9).
“I am the Soul, O son of Pandu, of all the worlds, of all the universe. Rudra, again, is my Soul. It is for this that I always adore him. If I do not adore the auspicious and boon-giving Isana nobody would then adore my own self.”
- The Shanti Parva (Chapter 342) of the Mahabharata.
I hope this clarifies all your queries. Prd..