<p>I have ran into an issue with ambassador (Envoy). Ambassador doesn't simultaneously support HTTP and HTTPS. So that, as a workaround I have to deploy two set of ambassadors (one for HTTP and other for HTTPS). I have deployed two set of ambassadors.</p>

<pre><code>NAME                       READY   STATUS    RESTARTS   AGE
pod/ambassador-k7nlr       2/2     Running   0          55m
pod/ambassador-t2dbm       2/2     Running   0          55m
pod/ambassador-tls-7h6td   2/2     Running   0          107s

NAME                           TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)          AGE
service/ambassador-admin       NodePort    10.233.58.170   &lt;none&gt;        8877:30857/TCP   18d
service/ambassador-admin-tls   NodePort    10.233.33.29    &lt;none&gt;        8878:32339/TCP   28m
service/ambassador-monitor     ClusterIP   None            &lt;none&gt;        9102/TCP         18d

NAME                            DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR                      AGE
daemonset.apps/ambassador       2         2         2       2            2           node-role.kubernetes.io/node=      58m
daemonset.apps/ambassador-tls   1         1         1       1            1           node-role.kubernetes.io/node=tls   107s
</code></pre>

<p>Below two set of pods I wanted to use for http</p>

<pre><code>pod/ambassador-k7nlr       2/2     Running   0          55m
pod/ambassador-t2dbm       2/2     Running   0          55m
</code></pre>

<p>And this one for https</p>

<pre><code>pod/ambassador-tls-7h6td   2/2     Running   0          107s
</code></pre>

<p>below are my service annotation</p>

<pre><code>getambassador.io/config: |
  ---
  apiVersion: ambassador/v0
  kind: Module
  name: tls
  config:
    server:
      secret: dashboard-certs
  ---
  apiVersion: ambassador/v0
  kind:  Mapping
  name:  dashboard_test_mapping
  host:  dashboard.example.com
  service: https://dashboard.test.svc.cluster.local
  prefix: /
</code></pre>

<p>Here the <code>apiVersion: ambassador/v0</code> is referring to both the ambassador set, so whatever changes I made in the service annotation will be reflected in both the set of ambassadors.</p>

<p>I wanted to set this service annotation for a specific ambassador daemonset (HTTPS).</p>

<p>Any suggestions ??</p>

<p>You can use <code>AMBASSADOR_ID</code> for that, like this:</p>

<pre><code>getambassador.io/config: |
  ---
  ambassador_id: ambassador-1
  apiVersion: ambassador/v0
  kind: Module
  name: tls
  config:
    server:
      secret: dashboard-certs
  ---
  ambassador_id: ambassador-1
  apiVersion: ambassador/v0
  kind:  Mapping
  name:  dashboard_test_mapping
  host:  dashboard.example.com
  service: https://dashboard.test.svc.cluster.local
  prefix: /

</code></pre>

<p>and then specify this id in env variables of DaemonSet:</p>

<pre><code>env:
- name: AMBASSADOR_ID
  value: ambassador-1
</code></pre>

<p>Refer to the documentation:
<a href="https://www.getambassador.io/reference/running/#ambassador_id" rel="nofollow noreferrer">https://www.getambassador.io/reference/running/#ambassador_id</a></p>
