On the maintenance hosts, the sql bash script launches the mysql.php maintenance script. Together, both wrappers just construct appropriate flags for mysql and then shell out to it. (docs)
In the mw-on-k8s world, we can't just use mwscript-k8s --attach to run the maintenance script, because mysql isn't installed in the multiversion MW image. (We could build another image and use that, but it's not clear that we need the added complexity.)
The simplest approach is probably to write a replacement in Python that shells out to mysql directly, basically doing the same argv construction as mysql.php, but reading dbconfig objects from etcd, à la dbctl. This can run locally, it doesn't need to involve the mwscript apparatus at all. (But because the existing solution is run on the mwmaint hosts, we should consider it a blocker for turning those hosts off.)