How to convert PNG to KTX texture?

It's easy to convert .png into .ktx by yourself. KTX - is header with meta information about image or images batch in file and array of images bytes. KTX spec you can find here. Make sure that ETC2 compression is used while conversations.

Moreover, there are a few third party solutions for Android, for example libktx

Regarding iOS platform, MetalKit can work with .ktx files.