Welcome to the Microsoft Q&A Platform!
So, here's the deal: the self-hosted gateway v2 doesn't support custom domain names yet, which can be a bit of a hassle. When you're trying to integrate Azure API Management (APIM) with a self-hosted gateway on a private AKS cluster, this limitation can cause some issues.
I know you tried using HostAlias as a workaround, but it didn't quite do the trick. Since custom domains aren't supported in the self-hosted gateway v2, your options are a bit limited.
For more solutions or workarounds, check out the official Azure documentation for any updates on this, or take a look at community forums for some alternative tips.
References: