惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
The GitHub Blog
The GitHub Blog
小众软件
小众软件
美团技术团队
博客园 - 司徒正美
G
Google Developers Blog
Blog — PlanetScale
Blog — PlanetScale
Hugging Face - Blog
Hugging Face - Blog
博客园_首页
大猫的无限游戏
大猫的无限游戏
罗磊的独立博客
Recent Announcements
Recent Announcements
酷 壳 – CoolShell
酷 壳 – CoolShell
D
Docker
J
Java Code Geeks
Last Week in AI
Last Week in AI
V
Visual Studio Blog
Microsoft Azure Blog
Microsoft Azure Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Proofpoint News Feed
V
V2EX
C
Check Point Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
MyScale Blog
MyScale Blog

OneUptime Blog

How to Monitor Azure App Services (PaaS) with OpenTelemetry Grafana Stack vs OneUptime: DIY Observability or Unified Platform? Your AI Workloads Are About to Blow Up Your Observability Bill The Great Observability Consolidation Is Here How to Write Custom Object Classes for Ceph How to Write Custom Ceph Manager Modules How to Write a ceph.conf Configuration File How to Use Rook-Ceph with OpenShift How to Use Rook-Ceph with Longhorn for Comparison How to Configure Volume Snapshot Class for RBD in Rook How to Configure VolumeReplicationClass Scheduling Intervals in Rook How to Set Up Volume Replication with Rook-Ceph How to Create Volume Group Snapshots with Rook CSI How to Visualize Ceph Network Performance in Grafana How to View Runtime Configuration via Admin Socket How to View Quota Settings and Update Stats in Ceph RGW How to View PG Scaling Recommendations with autoscale-status How to View PG Distribution via Admin Socket How to View Performance Metrics in the Ceph Dashboard How to View OSD Performance Counters in Ceph How to View Connection Status via Admin Socket How to View Ceph Cluster Summary Dashboard via CLI How to Version Control Rook-Ceph Configuration How to Version Control Ceph Infrastructure with Terraform How to Verify Kubernetes Node Requirements for Rook-Ceph Deployment How to Verify Health Before and After Rook Upgrades How to Verify Data Integrity with Deep Scrubbing How to Verify Complete Rook-Ceph Cleanup How to Verify Backup Integrity from Ceph Snapshots How to Use Rook-Ceph with Velero for Kubernetes Backup
How to Enable Virtual Host-Style Bucket Access in Rook
Nawaz Dhandala · 2026-03-31 · via OneUptime Blog

Path-Style vs Virtual Host-Style S3 Access

S3-compatible object stores support two URL formats:

  • Path-style: http://s3.example.com/bucket-name/object-key
  • Virtual host-style: http://bucket-name.s3.example.com/object-key

AWS deprecated path-style access for new buckets in 2020, and many modern S3 clients and SDKs default to virtual host-style. Enabling this in Rook requires DNS wildcard configuration and RGW hostname settings.

DNS Requirements

For virtual host-style to work, DNS must resolve *.s3.example.com (wildcard) to the RGW endpoint. Configure this in your DNS server:

s3.example.com        A    <RGW IP or Load Balancer IP>
*.s3.example.com      A    <RGW IP or Load Balancer IP>

With a wildcard entry, mybucket.s3.example.com automatically resolves to the RGW endpoint.

Configuring Rook for Virtual Host-Style Access

Set the dnsNames and advertiseEndpoint in the hosting section of the CephObjectStore spec:

apiVersion: ceph.rook.io/v1
kind: CephObjectStore
metadata:
  name: my-store
  namespace: rook-ceph
spec:
  metadataPool:
    replicated:
      size: 3
  dataPool:
    replicated:
      size: 3
  gateway:
    port: 80
    instances: 2
  hosting:
    advertiseEndpoint:
      dnsName: s3.example.com
      port: 80
      useTls: false
    dnsNames:
      - s3.example.com

This tells RGW to accept requests coming in on s3.example.com and route virtual host-style requests by extracting the bucket name from the subdomain.

Enabling in RGW Configuration

RGW has a configuration option to explicitly allow virtual-hosted buckets. Apply this via the Rook toolbox:

kubectl -n rook-ceph exec -it deploy/rook-ceph-tools -- bash

ceph config set client.rgw rgw_dns_name s3.example.com
ceph config set client.rgw rgw_resolve_cname true

Restart RGW pods to apply:

kubectl -n rook-ceph rollout restart deployment -l app=rook-ceph-rgw

TLS with Wildcard Certificates

For HTTPS virtual host-style access, your TLS certificate must include a wildcard SAN:

Subject Alternative Names:
  DNS: s3.example.com
  DNS: *.s3.example.com

Create the secret:

kubectl -n rook-ceph create secret tls rgw-wildcard-tls \
  --cert=/path/to/wildcard-cert.pem \
  --key=/path/to/wildcard-key.pem

Reference it in the object store:

gateway:
  securePort: 443
  sslCertificateRef: rgw-wildcard-tls
hosting:
  advertiseEndpoint:
    dnsName: s3.example.com
    port: 443
    useTls: true
  dnsNames:
    - s3.example.com

Testing Virtual Host-Style Access

Create a bucket and access it using the subdomain format:

aws s3 mb s3://my-test-bucket \
  --endpoint-url http://s3.example.com

# Virtual host-style access
aws s3 ls s3://my-test-bucket \
  --endpoint-url http://s3.example.com

# Direct URL test
curl http://my-test-bucket.s3.example.com/

Summary

Enabling virtual host-style bucket access in Rook requires DNS wildcard configuration pointing to the RGW endpoint, setting dnsNames in the CephObjectStore hosting spec, and configuring rgw_dns_name in the Ceph config. For HTTPS, a wildcard TLS certificate covering *.s3.example.com is required. Once configured, clients can use bucket-name.s3.example.com URLs, which is the modern default for S3-compatible SDKs.