<p>I'm trying to route traffic to a static bucket on GCE. Right now I am using ingress, but have found the docs for Google here:</p>

<p><a href="https://cloud.google.com/compute/docs/load-balancing/http/adding-a-backend-bucket-to-content-based-load-balancing" rel="nofollow noreferrer">https://cloud.google.com/compute/docs/load-balancing/http/adding-a-backend-bucket-to-content-based-load-balancing</a></p>

<p>I get all the way through, but cannot select the 'backend bucket' while in the hosts and paths menu doing the url mapping... even though it is listed under the backend buckets. The 'Backend Services' options can be selected, but the backend buckets menu is disabled. Does anyone know of a better tutorial, or a better way to route traffic to a bucket for static content?</p>

<p>Can I specify it in the ingress yaml maybe?</p>

<p>It looks like this will be available in kubernetes <strong>1.19</strong></p>
<p>Note, however, that 1.19 isn't available on GKE yet (as of the time of this post) but regardless I thought this would be useful information for people landing here. When 1.19 is available, I'll try it out and update this answer.</p>
<p>For a preview of how this will look in config, the <a href="https://github.com/kubernetes/website/pull/21590/files#diff-56bb969f0c219fb744bcbcb43e40335a" rel="noreferrer">pull request</a> for the feature includes an example</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: ingress-resource-backend
spec:
  defaultBackend:
    resource:
      apiGroup: k8s.example.com
      kind: StorageBucket
      name: static-assets
  rules:
    - http:
        paths:
          - path: /icons
            pathType: ImplementationSpecific
            backend:
              resource:
                apiGroup: k8s.example.com
                kind: StorageBucket
                name: icon-assets
</code></pre>
