Sri Krishna, while equating himself with greatest among all living beings and non-living things among various sects, says in Bhagavad Gita as follows:
आदित्यानामहं विष्णुर्ज्योतिषां रविरंशुमान्।
मरीचिर्मरुतामस्मि नक्षत्राणामहं शशी।।10.21।।
Adityanam, among the twelve Adityas; aham, I; am the Aditya called Visnu. Jyotisam, among the luminaries; amsuman, the radiant; ravih, sun. Marutam, among the different gods called Maruts; asmi, I am; the one called Marici. Naksatranam, among the stars; I am sasi, the moon.
वेदानां सामवेदोऽस्मि देवानामस्मि वासवः।
इन्द्रियाणां मनश्चास्मि भूतानामस्मि चेतना।।10.22।।
Vedanam, among the Vedas; I am the Sama-veda. Devanam, among the gods-such as Rudras, Adityas and others; I am vasavah, Indra. Indriyanam, among the eleven organs, viz eye etc.; I am the manah, mind. I am the mind which is of the nature of reflection and doubt. And I am the cetana, intelligence [It is the medium for the manifestation of Consciousness.], the function of the intellect ever manifest in the aggregate of body and organs; bhtanam, in creatures.
रुद्राणां शङ्करश्चास्मि वित्तेशो यक्षरक्षसाम्।
वसूनां पावकश्चास्मि मेरुः शिखरिणामहम्।।10.23।।
Rudranam, among the eleven Rudras, I am Sankara; and yaksaraksasam, among the Yaksas and goblins; I am vittesah, Kubera. Vasunam, among the eight Vasus; I am pavakah, Fire; and sikharinam, among the peaked mountains, I am Meru.
Sri Krishna gave this discourse to Arjuna almost at the end of Dwaapara yuda, i.e, nearly 5000 years ago. He said that he is Indra among Devatas (33 Gods).
He also said that he is Vishnu among Adityas and Shankara among Rudras.
Why did not he say that he is Vishnu or Shiva among Devatas?