<p>I am using Ambassador as the ingress controller for my kubernetes setup. I need to connect to multiple ports on my containers, for example, I have a RethinkDB container and I need to connect to port 8085 for its web-ui, port 28015 for RDB-API and port 29015 for adding nodes to Rethinkdb and clustering.</p>

<p>I tried different configuration but they didn't work. The configurations that I tried:
1- This configuration works for the latest mapping which means if I replace 8085 mapping with 29015 and put it at the end I am able to access the web-ui but not other parts and so on.</p>

<pre><code>getambassador.io/config: |
  ---
  apiVersion: ambassador/v1
  kind: Mapping
  name: rethinkdb_mapping
  prefix: /rethinkdb:28015/
  service: rethinkdb:28015
  labels:
    ambassador:
      - request_label:
        - rethinkdb:28015
  ---
  apiVersion: ambassador/v1
  kind: Mapping
  name: rethinkdb_mapping
  - prefix: /rethinkdb:8085/
    service: rethinkdb:8085
  labels:
    ambassador:
      - request_label:
        - rethinkdb:8085
  ---
  apiVersion: ambassador/v1
  kind: Mapping
  name: rethinkdb_mapping
  prefix: /rethinkdb:29015/
  service: rethinkdb:29015
  labels:
    ambassador:
      - request_label:
        - rethinkdb:29015
</code></pre>

<p>2- This one didn't work at all</p>

<pre><code>getambassador.io/config: |
  ---
  apiVersion: ambassador/v1
  kind: Mapping
  name: rethinkdb_mapping
  - prefix: /rethinkdb:8085/
    service: rethinkdb:8085
 - prefix: /rethinkdb:29015/
   service: rethinkdb:29015
 - prefix: /rethinkdb:28015/
   service: rethinkdb:28015
</code></pre>

<p>How shall I configure Ambassador so I can have access to all ports of my container?</p>

AVarf
<p>Try to put different names of Mappings like in example below:</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  name: rethinkdb
  annotations:
    getambassador.io/config: |
      ---
      apiVersion: ambassador/v1
      kind: Mapping
      name: rethinkdb_mapping
      prefix: /rethinkdb:28015/
      service: rethinkdb:28015
      labels:
        ambassador:
          - request_label:
            - rethinkdb:28015
      ---
      apiVersion: ambassador/v1
      kind: Mapping
      name: rethinkdb_mapping1
      prefix: /rethinkdb:8085/
      service: rethinkdb:8085
      labels:
        ambassador:
          - request_label:
            - rethinkdb:8085
      ---
      apiVersion: ambassador/v1
      kind: Mapping
      name: rethinkdb_mapping2
      prefix: /rethinkdb:29015/
      service: rethinkdb:29015
      labels:
        ambassador:
          - request_label:
            - rethinkdb:29015
spec:
  type: ClusterIP
  clusterIP: None
</code></pre>

<p>Remember to put right name of service into service label inside mappings definition.</p>

<p><strong>Note on indents and   correct syntax.</strong></p>

<p>I hope it helps.</p>
