<p>We have a k8s cluster with an nginx Ingress and Minio installed. In Minio I have a bucket called <code>tester</code> with a hello world <code>index.html</code> file. I used the Minio MC client to set the <code>tester</code> bucket to public. Now I am able to see the hello world file when I visit my (altered) minio url like so: <code>https://minio.example.com/tester/index.html</code>. </p>

<p>My goal is to set up an Ingress resource to access the public bucket. Here is my manifest to try and do so, however I only ever get a 404 error . . . </p>

<p><code>ingress.yaml</code></p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: frontend-site
  namespace: "default"
  labels:
    type: "frontend"
    awesomeness: "super-mega"
  annotations:
    kubernetes.io/ingress.class: "nginx"
spec:
  rules:
    - host: app.example.com
      http:
        paths:
          - path: /tester/
            backend:
              serviceName: minio-svc
              servicePort: 9000
          - path: /tester/*
            backend:
              serviceName: minio-svc
              servicePort: 9000
  tls:
    - hosts:
      - app.example.com
      secretName: ssl-certs
</code></pre>

<p>I have also tried to set the paths with the index fileto no avail like so:</p>

<pre><code>path: /tester/index.html
path: /tester/index.html/*
</code></pre>

<p>I do have another Ingress which points to Minio in general and it works perfect at the url like <code>minio.example.com</code>. The minio has a service called <code>minio-svc</code> on port 9000. </p>

<p>Unfortunately I have only ever received a 404 from my Ingress thus far. Anyone else deploying static sites with Ingress to public Minio bucket? What am I doing wrong???</p>

<p><strong>Updates</strong></p>

<p>So I kind of got somewhere. I added an annotation and  set the paths to simply <code>/</code> and <code>/*</code>. </p>

<p>Here is my new config:</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: frontend-site
  namespace: "default"
  labels:
    type: "frontend"
    awesomeness: "super-mega"
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /tester/index.html
spec:
  rules:
    - host: app.example.com
      http:
        paths:
          - path: /
            backend:
              serviceName: minio-svc
              servicePort: 9000
          - path: /*
            backend:
              serviceName: minio-svc
              servicePort: 9000
  tls:
    - hosts:
      - app.example.com
      secretName: ssl-certs
</code></pre>

<p>Now I just get access denied from Minio even though the bucket is public and I can still access from <code>https://minio.example.com/tester/index.html</code>!?</p>

<p>Found out you can't do what I'm asking very easily. I got around it all by simply mounting the directory from the bucket directly to Nginx. Voila!</p>
