<p>I have a static website bundle I want to serve on my cluster. The bundle is stored in a google cloud storage bucket, which makes me think I may not actually need a separate "server" to return the files. </p>

<p>I have been able to get Python-Flask to reference the files from the bucket, but I can't seem to figure out how to get Ambassador to do the same. I could do something like add the bundle to an nginx instance, but I don't want to build the JS bundle into any docker image so I can do rapid updates.</p>

<p>I can't figure out how to set up an ambassador route to do the following:</p>

<p>If a user goes to</p>

<p><a href="https://my-website.com/" rel="nofollow noreferrer">https://my-website.com/</a></p>

<p>They get the <code>index.html</code> served from my Google Bucket <code>my-bucket/index.html</code></p>

<p>and when the index.html references a file internally (/static/js/main.js), Ambassador serves up the file found at <code>my-bucket/static/js/main.js</code></p>

<p>I have tried setting up a service like so:</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  annotations:
    getambassador.io/config: |
      ---
      apiVersion: ambassador/v0
      kind: Mapping
      name: website_mapping
      prefix: /website/
      service: https://my-bucket-url/index.html
  name: website-service
  labels:
    app: website-service
spec:
  ports:
    - port: 80
      targetPort: 80
      name: http-website
  selector:
    app: website
</code></pre>

<p>But navigating to <code>my-website.com/website/</code> only gets me a 503 error with the console complaining "the character of the encoding of the plain text document was not declared"</p>

<p>I feel like I'm going about this wrong. Can I serve straight from the bucket like this using Ambassador, or do I really need something like nginx?</p>

mstorkson
<p>Ambassador is actually not a web server (as Laszlo Valko points out). It needs to proxy your request to some other web server for this to work -- that can certainly be Flask (in fact, the Ambassador diagnostic service is a Flask application started at boot time inside the Ambassador pod), but it needs to be running somewhere. :)</p>
