The gods like Indra in Vedas and Upanishadetc are just the titles.
Then Nārāyaṇa is eternal. Brahmā is Nārāyaṇa, Śiva is Nārāyaṇa, Inḍra is Nārāyaṇa, Kāla (time) is Nārāyaṇa, Ḍik (space) is Nārāyaṇa, the intermediate quarters also are Nārāyaṇa;
So the Indra of Upanishad is a title of Vishnu also. In Vedas and Upanishad a supreme god have different forms or title.
Paramāṭmā, the womb of all elements, the All-Witness, and above lamas. He only is Brahma. He only is Śiva. He only is Inḍra. He only is the indestructible. He only is the Supreme. He only is the Self-Shining. He only is Vishṇū.
So Both Vishnu and Indra and all other names of Vedas are title of god. So if Indra is saying to worship him, he is saying to worship Vishnu or Superme Brahma.
In the Bhagwad Gita Krishna is also reffering to the same god.
आदित्यानामहं विष्णुर्ज्योतिषां रविरंशुमान् |
मरीचिर्मरुतामस्मि नक्षत्राणामहं
Amongst the twelve sons of Aditi I am Vishnu; amongst luminous objects I am the sun. Know me to be Marichi amongst the Maruts, and the moon amongst the stars in the night sky.
वेदानां सामवेदोऽस्मि देवानामस्मि वासव: |
इन्द्रियाणां मनश्चास्मि भूतानामस्मि चेतना
I am the Sāma Veda amongst the Vedas, and Indra amongst the celestial gods. Amongst the senses I am the mind; amongst the living beings I am consciousness.
Krishna is also the form of Superme god (Vishnu). That's why he is also conveying the same message of Upanishad.