Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Application Load Balancer
  • Getting started
    • Overview
      • Overview
      • Installing Gwin
      • Gwin policies
      • Migrating apps from an ALB Ingress controller to Gwin
      • Attachment mechanism for Gwin integration with Application Load Balancer
        • DirectResponse
        • Gateway
        • BackendTLSPolicy
        • GatewayPolicy
        • GRPCRoute
        • HTTPRoute
        • Ingress
        • IngressBackendGroup
        • IngressPolicy
        • ListenerSetPolicy
        • RoutePolicy
        • Service
        • ListenerSet
        • ServicePolicy
        • YCCertificate
        • TLSRoute
        • YCStorageBucket
    • Configuring security groups
    • Working with service accounts
    • Creating and updating resources via ingress controller configurations
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • L7 load balancer logs
  • Release notes

In this article:

  • Controlling browser behavior
  • Cheatsheet
  • YCStorageBucketSpec
  • YCStorageBucketReference
  1. Tools for Managed Service for Kubernetes
  2. Gwin
  3. Resource configuration
  4. YCStorageBucket

YCStorageBucket

Written by
Yandex Cloud
Updated at July 3, 2026
View in Markdown
  • Controlling browser behavior
  • Cheatsheet
  • YCStorageBucketSpec
    • YCStorageBucketReference

YCStorageBucket is a Gwin custom resource for referencing S3 buckets from Yandex Object Storage. It allows you to use Object Storage buckets as backend targets in HTTPRoute, IngressBackendGroup, Ingress resources for serving static content or as part of traffic routing strategies.

When a request is routed to a YCStorageBucket backend, the load balancer forwards the request to the bucket using the URL path from the incoming request. For example, a request for /robots.txt will fetch the object at key robots.txt from the bucket.

Controlling browser behaviorControlling browser behavior

Whether a browser displays or downloads a file depends on the Content-Type and Content-Disposition response headers. To make the browser display the content instead of downloading it, ensure the object is served with the correct Content-Type and no Content-Disposition: attachment.

Option 1 (recommended): Upload objects with explicit content type metadata:

aws s3 cp index.html s3://my-bucket/index.html
--content-type "text/html; charset=utf-8"
--endpoint-url https://storage.yandexcloud.net

Option 2: Override headers at the routing layer without changing objects in storage.

For HTTPRoute, use a ResponseHeaderModifier filter on the rule:

filters:

  • type: ResponseHeaderModifier
    responseHeaderModifier:
    set:
    - name: Content-Type
    value: text/html; charset=utf-8
    remove:
    - Content-Disposition

For Ingress, use annotations on the rule:

annotations:
gwin.yandex.cloud/rules.modifyResponseHeaders.replace.Content-Type: "text/html; charset=utf-8"
gwin.yandex.cloud/rules.modifyResponseHeaders.remove: "Content-Disposition"

  • Cheatsheet
  • YCStorageBucketSpec
    • YCStorageBucketReference

CheatsheetCheatsheet

apiVersion: gwin.yandex.cloud/v1
kind: YCStorageBucket
metadata:
  name: example-bucket
  namespace: example-ns
spec:
  bucketRef:
    bucketName: "my-static-content-bucket"

Reference the YCStorageBucket as a backend in HTTPRoute:

apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: static-content-route
  namespace: example-ns
spec:
  parentRefs:
    - name: example-gateway
  hostnames:
    - "static.example.com"
  rules:
    - matches:
        - path:
            type: PathPrefix
            value: "/assets"
      backendRefs:
        - group: gwin.yandex.cloud
          kind: YCStorageBucket
          name: example-bucket
          weight: 100

To use YCStorageBucket as a backend for Ingress, use IngressBackendGroup.

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: static-content-ingress
  namespace: example-ns
  annotations:
    ...
spec:
  ingressClassName: gwin-default
  rules:
    - host: static.example.com
      http:
        paths:
          - pathType: Prefix
            path: "/assets"
            backend:
              resource:
                apiGroup: gwin.yandex.cloud
                kind: IngressBackendGroup
                name: static-bg
---
apiVersion: gwin.yandex.cloud/v1
kind: IngressBackendGroup
metadata:
  name: static-bg
  namespace: example-ns
spec:
  type: HTTP
  backends:
    - name: some-bucket
      backendRef:
        group: gwin.yandex.cloud
        kind: YCStorageBucket
        name: example-bucket
        weight: 100
Field Description
metadata ObjectMeta
Standard Kubernetes metadata.
spec YCStorageBucketSpec
Storage bucket specification.

YCStorageBucketSpecYCStorageBucketSpec

YCStorageBucketSpec defines the desired state of YCStorageBucket.

Appears in: YCStorageBucket

Field Description
bucketRef YCStorageBucketReference
Reference to the Yandex Cloud S3 Bucket.

YCStorageBucketReferenceYCStorageBucketReference

YCStorageBucketReference is a reference to a Yandex Cloud S3 Bucket.

Appears in: YCStorageBucketSpec

Field Description
bucketName string
Name of the Yandex Cloud S3 Bucket.
Example: my-static-content-bucket

Was the article helpful?

Previous
TLSRoute
Next
Overview
© 2026 Direct Cursus Technology L.L.C.