<p>I am using Ambassador API Gateway in my GKE as below:</p>
<pre><code>apiVersion: getambassador.io/v2
kind: Mapping
metadata:
  name: my-service
spec:
  host: app.mycompany.com
  prefix: /
  service: my-service
</code></pre>
<p>However, I would like to map all sub domains (*.mycompany.com) and route to my-service</p>
<pre><code>apiVersion: getambassador.io/v2
kind: Mapping
metadata:
  name: my-service
spec:
  host: *.app.mycompany.com
  prefix: /
  service: my-service
</code></pre>
<p>How to map wildcard subdomain?</p>

<p>Based on this <a href="https://www.getambassador.io/docs/latest/topics/using/headers/host/" rel="nofollow noreferrer">documentation</a>, you have to set the host as a regex pattern to match against your subdomains.</p>
<p>So in your case, you'd want this:</p>
<pre><code>apiVersion: getambassador.io/v2
kind: Mapping
metadata:
  name: my-service
spec:
  host: &quot;[a-z]*\\.app\\.mycompany\\.com&quot;
  host_regex: true
  prefix: /
  service: my-service
</code></pre>
