Yandex Cloud
Поиск
Связаться с экспертомПопробовать бесплатно
  • Кейсы
  • Документация
  • Блог
  • Все сервисы
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • VibeCraft
    • Yandex Cloud Detection and Response
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • GOST Gateway
    • Yandex SIEM
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • SourceCraft
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • Статус работы сервисов
  • Marketplace
    • Популярные
    • Инфраструктура и сеть
    • Платформа данных
    • Искусственный интеллект
    • Безопасность
    • Инструменты DevOps
    • Бессерверные вычисления
    • Управление ресурсами
  • Все решения
    • По отраслям
    • По типу задач
    • Экономика платформы
    • Yandex Cloud Trust
    • Техническая поддержка
    • Каталог партнёров
    • Обучение и сертификация
    • Облако для стартапов
    • Облако для крупного бизнеса
    • Центр технологий для общества
    • Облако для интеграторов
    • Облако для фрилансеров
    • Обучение и сертификация
    • Блог
    • Документация
    • Контент-программа
    • Мероприятия и вебинары
    • Контакты, чаты и сообщества
    • Идеи
    • Калькулятор цен
    • Тарифы
  • Кейсы
  • Документация
  • Блог
Сделано на Gravity UI
Проект Яндекса
© 2026 ООО «Яндекс.Облако»
Yandex Application Load Balancer
  • Начало работы
    • Обзор
      • Обзор
      • Установка Gwin
      • Обновление Gwin
      • Политики Gwin
      • Маршрутизация трафика напрямую в поды кластера
      • Миграция приложений с ALB Ingress-контроллера на Gwin
      • Механизм Attachment для интеграции Gwin с Application Load Balancer
        • BackendTLSPolicy
        • DirectResponse
        • GatewayPolicy
        • Gateway
        • HTTPRoute
        • Ingress
        • IngressBackendGroup
        • GRPCRoute
        • ListenerSetPolicy
        • ListenerSet
        • IngressPolicy
        • RoutePolicy
        • Service
        • YCCertificate
        • ServicePolicy
        • TLSRoute
        • YCStorageBucket
    • Настройка групп безопасности
    • Работа с сервисными аккаунтами
    • Создание и изменение ресурсов по конфигурации
  • Управление доступом
  • Правила тарификации
  • Справочник Terraform
  • Метрики Monitoring
  • Аудитные логи Audit Trails
  • Логи L7-балансировщика
  • Вопросы и ответы про Application Load Balancer
  • История изменений
  • Обучающие курсы

В этой статье:

  • Controlling browser behavior
  • Cheatsheet
  • YCStorageBucketSpec
  • YCStorageBucketReference
  1. Инструменты для Managed Service for Kubernetes
  2. Gwin
  3. Конфигурация ресурсов (англ.)
  4. YCStorageBucket

YCStorageBucket

Статья создана
Yandex Cloud
Открыть в 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

Была ли статья полезна?

Предыдущая
TLSRoute
Следующая
Обзор
Сделано на Gravity UI
Проект Яндекса
© 2026 ООО «Яндекс.Облако»