One S3 endpoint
for the whole lakehouse.
Six scenarios: how Ozone is accessed and how to connect Trino, Spark and the lakehouse jobs, the Hive Metastore, Airflow, and ClickHouse, and the notebooks and S3 tools. Each one covers: what changes, the configuration block commented line by line, and where the rest lives, on the consumer's page.
The tdp-ozone chart publishes the S3 Gateway in an internal Service and, with security on, keeps the administrator key in the ozone-s3-credentials Secret. Each TDP component receives, in its own values file, the address of this Service, a key pair and path-style access, and writes to the buckets through S3 (s3a://). No consumer needs a Kerberos ticket.
Your environment
If you fill in your environment details here, the examples and commands on the page use what you provided. The namespace, the release name and the values file are your choices, not the chart's.
Scenarios
- 1 · How it is accessed
- 2 · Trino
- 3 · Spark, Iceberg and Delta Lake
- 4 · Hive Metastore
- 5 · Airflow and ClickHouse
- 6 · Notebooks and tools
Endpoint, keys, region, path-style and the warehouse bucket.
Consumers access Ozone through the address of the S3 Gateway Service, with an S3 key pair. All TDP components talk to Ozone only through S3 (s3a://), never through the native Ozone protocol, and all of them need the same things: the S3 Gateway address, a key pair, the region, path-style access (the bucket goes in the URL path, not in the hostname) and a bucket that already exists. Ozone Kerberos, when on, serves only the Ozone daemons: the consumers sign requests with an access key and secret key, with no ticket.
By default, Ozone security is off: the S3 Gateway accepts any non-empty key pair, and the ozone-s3-credentials Secret does not exist. The component charts already carry a default endpoint, shown below.
The following tabs connect each consumer: Trino in scenario 2, Spark, Iceberg and Delta Lake in scenario 3, Hive Metastore in scenario 4, Airflow and ClickHouse in scenario 5, and notebooks and S3 tools in scenario 6.
The <RELEASE_NAME>-s3g-rest Service, on the s3g.service.rest.port port, without TLS inside the cluster. From outside the cluster, the hostname published by the Ingress or the Gateway API.
With security off (default), any non-empty pair. With it on, those from the ozone-s3-credentials Secret, which exists only in the Ozone namespace, or those of an additional user, issued by the Ozone Manager.
The TDP charts keep their data in the warehouse bucket: the Hive Metastore warehouse, the Iceberg and Delta Lake tables and the Spark event logs. Create it before installing those charts.
All consumers on the same S3 Gateway
Ozone security
- Trino. The hive and iceberg catalogs read and write to Ozone through Trino's native S3. It does not need a Kerberos ticket. (
tdp-trino.catalogs) - Spark. Writes and reads through S3A, with the endpoint and keys from the core-site.xml generated by the chart. It does not need a Kerberos ticket. (
tdp-spark.hadoopConfig) - Iceberg and Delta Lake. The maintenance CronJobs read the endpoint from maintenance.spark.config and the keys from a Secret. It does not need a Kerberos ticket. (
maintenance.spark.s3Credentials) - Hive Metastore. With metastore.type s3, the warehouse lives in an Ozone bucket, and not on a local volume. It does not need a Kerberos ticket. (
tdp-hive-metastore.metastore.s3) - Airflow and ClickHouse. Each one receives a generic S3 connection, with the address and the keys, in TDP-Settings.s3Connection. It does not need a Kerberos ticket. (
TDP-Settings.s3Connection) - Jupyter. The NetworkPolicy of the notebook pods already allows the Ozone ports. It does not need a Kerberos ticket. (
tdp-jupyter.singleuser.networkPolicy.egress) - AWS CLI and SDKs. Any S3 client: endpoint, region and the keys. It does not need a Kerberos ticket.
- Keys with security off. With security off, the S3 Gateway accepts any non-empty key pair, and the chart creates no keys Secret. Chart default:
security off. (tdp-ozone.s3g.auth.secretName) - S3 Gateway. The S3 endpoint for all consumers, in the internal Service <RELEASE_NAME>-s3g-rest. Clients use path-style and the us-east-1 region. Chart default:
port in s3g.service.rest.port. (tdp-ozone.s3g.service.rest.port) - Buckets. The TDP charts keep their data in the warehouse bucket: the Hive Metastore warehouse, the Iceberg and Delta Lake tables and the Spark event logs. Create it before installing those charts.
Ozone security: Off (default)
- Trino. The hive and iceberg catalogs read and write to Ozone through Trino's native S3. It does not need a Kerberos ticket. (
tdp-trino.catalogs) - Spark. Writes and reads through S3A, with the endpoint and keys from the core-site.xml generated by the chart. It does not need a Kerberos ticket. (
tdp-spark.hadoopConfig) - Iceberg and Delta Lake. The maintenance CronJobs read the endpoint from maintenance.spark.config and the keys from a Secret. It does not need a Kerberos ticket. (
maintenance.spark.s3Credentials) - Hive Metastore. With metastore.type s3, the warehouse lives in an Ozone bucket, and not on a local volume. It does not need a Kerberos ticket. (
tdp-hive-metastore.metastore.s3) - Airflow and ClickHouse. Each one receives a generic S3 connection, with the address and the keys, in TDP-Settings.s3Connection. It does not need a Kerberos ticket. (
TDP-Settings.s3Connection) - Jupyter. The NetworkPolicy of the notebook pods already allows the Ozone ports. It does not need a Kerberos ticket. (
tdp-jupyter.singleuser.networkPolicy.egress) - AWS CLI and SDKs. Any S3 client: endpoint, region and the keys. It does not need a Kerberos ticket.
- Keys with security off. With security off, the S3 Gateway accepts any non-empty key pair, and the chart creates no keys Secret. Chart default:
security off. (tdp-ozone.s3g.auth.secretName) - S3 Gateway. The S3 endpoint for all consumers, in the internal Service <RELEASE_NAME>-s3g-rest. Clients use path-style and the us-east-1 region. Chart default:
port in s3g.service.rest.port. (tdp-ozone.s3g.service.rest.port) - Buckets. The TDP charts keep their data in the warehouse bucket: the Hive Metastore warehouse, the Iceberg and Delta Lake tables and the Spark event logs. Create it before installing those charts.
Ozone security: On
- Trino. The hive and iceberg catalogs read and write to Ozone through Trino's native S3. It does not need a Kerberos ticket. (
tdp-trino.catalogs) - Spark. Writes and reads through S3A, with the endpoint and keys from the core-site.xml generated by the chart. It does not need a Kerberos ticket. (
tdp-spark.hadoopConfig) - Iceberg and Delta Lake. The maintenance CronJobs read the endpoint from maintenance.spark.config and the keys from a Secret. It does not need a Kerberos ticket. (
maintenance.spark.s3Credentials) - Hive Metastore. With metastore.type s3, the warehouse lives in an Ozone bucket, and not on a local volume. It does not need a Kerberos ticket. (
tdp-hive-metastore.metastore.s3) - Airflow and ClickHouse. Each one receives a generic S3 connection, with the address and the keys, in TDP-Settings.s3Connection. It does not need a Kerberos ticket. (
TDP-Settings.s3Connection) - Jupyter. The NetworkPolicy of the notebook pods already allows the Ozone ports. It does not need a Kerberos ticket. (
tdp-jupyter.singleuser.networkPolicy.egress) - AWS CLI and SDKs. Any S3 client: endpoint, region and the keys. It does not need a Kerberos ticket.
- ozone-s3-credentials Secret. With security on, the chart creates this Secret and fills it with the administrator key, issued by the Ozone Manager, in the aws_access_key_id and aws_secret_access_key keys. Per-application keys are also issued by the Ozone Manager (scenario 4 of the security page). The Secret exists only in the Ozone namespace: a consumer in another namespace receives a copy (scenario 1). Chart default:
security off. (tdp-ozone.s3g.auth.secretName) - S3 Gateway. The S3 endpoint for all consumers, in the internal Service <RELEASE_NAME>-s3g-rest. Clients use path-style and the us-east-1 region. Chart default:
port in s3g.service.rest.port. (tdp-ozone.s3g.service.rest.port) - Buckets. The TDP charts keep their data in the warehouse bucket: the Hive Metastore warehouse, the Iceberg and Delta Lake tables and the Spark event logs. Create it before installing those charts.
The endpoint inside the cluster
http://<RELEASE_NAME>-s3g-rest.<NAMESPACE>.svc.cluster.local:9878
| The consumer receives | Value |
|---|---|
| Endpoint | the address above |
| Region | us-east-1 |
| Path-style access | on |
| TLS on the internal endpoint | off |
| Keys | those from the step below |
Any other S3-compatible client connects to Ozone the same way: endpoint, region, path-style and keys.
The component charts already come pointed at the endpoint of the tdp-ozone release in the tdp namespace. When your release or namespace is different, set the endpoint in each consumer.
http://tdp-ozone-s3g-rest.tdp.svc.cluster.local:9878
Get the keys
The key pair the consumer will use.
With security off, the S3 Gateway accepts any non-empty key pair. Use a dummy pair in the consumer. It is not validated. To make the keys count, turn security on: see Security - Apache Ozone.
With security on, use the administrator key, from the ozone-s3-credentials Secret, or a key of the application's own, issued by the Ozone Manager (scenario 4 of the security page):
AWS_ACCESS_KEY_ID=$(kubectl -n <NAMESPACE> get secret ozone-s3-credentials -o jsonpath='{.data.aws_access_key_id}' | base64 -d)
AWS_SECRET_ACCESS_KEY=$(kubectl -n <NAMESPACE> get secret ozone-s3-credentials -o jsonpath='{.data.aws_secret_access_key}' | base64 -d)
In the charts that read a Secret, point to ozone-s3-credentials with the keys aws_access_key_id and aws_secret_access_key.
Copy the Secret to the consumer namespaceOpcional
The ozone-s3-credentials Secret also in the namespace of a consumer that is outside the Ozone namespace.
With security off, the ozone-s3-credentials Secret does not exist, and there is nothing to copy.
The ozone-s3-credentials Secret exists only in the Ozone namespace. For a consumer in another namespace, copy it, and copy it again after each key rotation:
kubectl -n <DEDICATED_NAMESPACE> create secret generic ozone-s3-credentials \
--from-literal=aws_access_key_id="$(kubectl -n <NAMESPACE> get secret ozone-s3-credentials -o jsonpath='{.data.aws_access_key_id}' | base64 -d)" \
--from-literal=aws_secret_access_key="$(kubectl -n <NAMESPACE> get secret ozone-s3-credentials -o jsonpath='{.data.aws_secret_access_key}' | base64 -d)"
It worked when
kubectl -n <DEDICATED_NAMESPACE> get secret ozone-s3-credentials shows the Secret in the consumer namespace.The components read the key when the pods start: restart the consumer pods after copying or changing the key.
Create the warehouse bucket
The bucket where the TDP charts keep their data, before installing them.
From your machine, through a port-forward to the S3 Gateway, with the AWS CLI configured with the keys from the previous step and the us-east-1 region:
kubectl -n <NAMESPACE> port-forward svc/<RELEASE_NAME>-s3g-rest 9878:9878 &
aws s3 mb s3://warehouse --endpoint-url=http://localhost:9878
aws s3 ls --endpoint-url=http://localhost:9878
It worked when
aws s3 ls lists the warehouse bucket.If the AWS CLI does not connect or refuses the key
The hive and iceberg catalogs over native S3.
You want to query the lakehouse tables kept in Ozone with Trino. The Trino hive and iceberg catalogs use Trino's native S3, with the endpoint, region, keys and path-style from scenario 1. The complete Trino values file, with the Hive Metastore addresses, is on the Trino integrations page.
The s3.* lines below in each of the hive and iceberg catalogs. With Ozone security on, the keys come from the ozone-s3-credentials Secret through environment variables.
One more property in both catalogs, because Trino asks for the STANDARD storage class by default.
Trino reaching the S3 Gateway
- Trino. The hive and iceberg catalogs read and write to Ozone through Trino's native S3. It does not need a Kerberos ticket. (
tdp-trino.catalogs) - Spark. Writes and reads through S3A, with the endpoint and keys from the core-site.xml generated by the chart. It does not need a Kerberos ticket. (
tdp-spark.hadoopConfig) - Iceberg and Delta Lake. The maintenance CronJobs read the endpoint from maintenance.spark.config and the keys from a Secret. It does not need a Kerberos ticket. (
maintenance.spark.s3Credentials) - Hive Metastore. With metastore.type s3, the warehouse lives in an Ozone bucket, and not on a local volume. It does not need a Kerberos ticket. (
tdp-hive-metastore.metastore.s3) - Airflow and ClickHouse. Each one receives a generic S3 connection, with the address and the keys, in TDP-Settings.s3Connection. It does not need a Kerberos ticket. (
TDP-Settings.s3Connection) - Jupyter. The NetworkPolicy of the notebook pods already allows the Ozone ports. It does not need a Kerberos ticket. (
tdp-jupyter.singleuser.networkPolicy.egress) - AWS CLI and SDKs. Any S3 client: endpoint, region and the keys. It does not need a Kerberos ticket.
- ozone-s3-credentials Secret. With security on, the chart creates this Secret and fills it with the administrator key, issued by the Ozone Manager, in the aws_access_key_id and aws_secret_access_key keys. Per-application keys are also issued by the Ozone Manager (scenario 4 of the security page). The Secret exists only in the Ozone namespace: a consumer in another namespace receives a copy (scenario 1). Chart default:
security off. (tdp-ozone.s3g.auth.secretName) - S3 Gateway. The S3 endpoint for all consumers, in the internal Service <RELEASE_NAME>-s3g-rest. Clients use path-style and the us-east-1 region. Chart default:
port in s3g.service.rest.port. (tdp-ozone.s3g.service.rest.port) - Buckets. The TDP charts keep their data in the warehouse bucket: the Hive Metastore warehouse, the Iceberg and Delta Lake tables and the Spark event logs. Create it before installing those charts.
1tdp-trino:2env:3 - name: AWS_ACCESS_KEY_ID4 valueFrom:5 secretKeyRef:6 name: ozone-s3-credentials7 key: aws_access_key_id8 - name: AWS_SECRET_ACCESS_KEY9 valueFrom:10 secretKeyRef:11 name: ozone-s3-credentials12 key: aws_secret_access_key13catalogs:14 iceberg: |15 connector.name=iceberg16 iceberg.catalog.type=hive_metastore17 hive.metastore.uri=thrift://<HIVE_METASTORE_SERVICE>:908318 fs.native-s3.enabled=true19 s3.endpoint=http://<RELEASE_NAME>-s3g-rest.<NAMESPACE>.svc.cluster.local:987820 s3.region=us-east-121 s3.path-style-access=true22 s3.aws-access-key=${ENV:AWS_ACCESS_KEY_ID}23 s3.aws-secret-key=${ENV:AWS_SECRET_ACCESS_KEY}
With Ozone security on, the keys from the ozone-s3-credentials Secret enter the Trino pods as environment variables. With it off, delete the env block.
- Keys through environment variables (linha 2). With Ozone security on, the keys from the ozone-s3-credentials Secret enter the Trino pods as environment variables. With it off, delete the env block.
- iceberg catalog (linha 15). A hive catalog takes the same s3.* lines, with connector.name=hive.
- Hive Metastore (linha 17). The Hive Metastore Service: its release name followed by -metastore.
- Native S3 (linha 18). Turns on Trino's native S3 filesystem.
- Endpoint (linha 19). The S3 Gateway Service, from scenario 1.
- Region (linha 20). The region that Ozone expects.
- Path-style (linha 21). The bucket goes in the URL path.
- Keys (linha 22). Read from the environment variables of the env block. With Ozone security off, write any non-empty pair here.
On an Ozone with a single datanode, such as on OpenShift Local, Trino asks for the STANDARD class, which the S3 Gateway translates into more replicas than one datanode can hold, and every write fails with HTTP 500. Add s3.storage-class=REDUCED_REDUNDANCY to both catalogs.
The Trino values file with the complete catalogs is in Integrations - Trino.
S3A in Spark and the keys of the maintenance jobs.
Spark reads and writes to Ozone through S3A. In the Spark chart, the properties go in hadoopConfig, which becomes the core-site.xml of the pods: the chart default already carries path-style, S3A, SSL off and the region, and only the endpoint and keys are missing. In the same values file, the Iceberg and Delta Lake storage endpoints also point to the S3 Gateway. The maintenance jobs of the Iceberg and Delta Lake charts read the endpoint from their own Spark configuration and the keys from a Secret.
Endpoint and keys in hadoopConfig, with no default. The keys can also come from a Secret with AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, loaded on the master and the workers.
Default endpoint for Ozone in the tdp namespace. With Ozone security off, keys from the default s3-credentials Secret, with any pair. With it on, from ozone-s3-credentials.
Spark and the lakehouse jobs on the S3 Gateway
- Trino. The hive and iceberg catalogs read and write to Ozone through Trino's native S3. It does not need a Kerberos ticket. (
tdp-trino.catalogs) - Spark. Writes and reads through S3A, with the endpoint and keys from the core-site.xml generated by the chart. It does not need a Kerberos ticket. (
tdp-spark.hadoopConfig) - Iceberg and Delta Lake. The maintenance CronJobs read the endpoint from maintenance.spark.config and the keys from a Secret. It does not need a Kerberos ticket. (
maintenance.spark.s3Credentials) - Hive Metastore. With metastore.type s3, the warehouse lives in an Ozone bucket, and not on a local volume. It does not need a Kerberos ticket. (
tdp-hive-metastore.metastore.s3) - Airflow and ClickHouse. Each one receives a generic S3 connection, with the address and the keys, in TDP-Settings.s3Connection. It does not need a Kerberos ticket. (
TDP-Settings.s3Connection) - Jupyter. The NetworkPolicy of the notebook pods already allows the Ozone ports. It does not need a Kerberos ticket. (
tdp-jupyter.singleuser.networkPolicy.egress) - AWS CLI and SDKs. Any S3 client: endpoint, region and the keys. It does not need a Kerberos ticket.
- Keys with security off. With security off, the S3 Gateway accepts any non-empty key pair, and the chart creates no keys Secret. Chart default:
security off. (tdp-ozone.s3g.auth.secretName) - S3 Gateway. The S3 endpoint for all consumers, in the internal Service <RELEASE_NAME>-s3g-rest. Clients use path-style and the us-east-1 region. Chart default:
port in s3g.service.rest.port. (tdp-ozone.s3g.service.rest.port) - Buckets. The TDP charts keep their data in the warehouse bucket: the Hive Metastore warehouse, the Iceberg and Delta Lake tables and the Spark event logs. Create it before installing those charts.
1tdp-spark:2hadoopConfig:3 fs.s3a.endpoint: "http://<RELEASE_NAME>-s3g-rest.<NAMESPACE>.svc.cluster.local:9878"4 fs.s3a.access.key: "<AWS_ACCESS_KEY_ID>"5 fs.s3a.secret.key: "<AWS_SECRET_ACCESS_KEY>"6iceberg:7 storage:8 endpoint: "http://<RELEASE_NAME>-s3g-rest.<NAMESPACE>.svc.cluster.local:9878"9deltaLake:10 storage:11 endpoint: "http://<RELEASE_NAME>-s3g-rest.<NAMESPACE>.svc.cluster.local:9878"
Becomes the core-site.xml of the Spark pods. Path-style, S3A, SSL off and the region already come in the chart default.
- hadoopConfig (linha 2). Becomes the core-site.xml of the Spark pods. Path-style, S3A, SSL off and the region already come in the chart default.
- Endpoint (linha 3). The S3 Gateway Service, from scenario 1. No default in the Spark chart.
- Keys (linha 4). No default in the Spark chart. With Ozone security off, any non-empty pair. On, the values from the ozone-s3-credentials Secret. Instead of writing them here, you can load them from a Secret with AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, through spark.master.extraEnvVarsSecret and spark.worker.extraEnvVarsSecret.
- Iceberg (linha 8). The same endpoint, in iceberg.storage.
- Delta Lake (linha 11). The same endpoint, in deltaLake.storage.
maintenance:
spark:
config:
"spark.hadoop.fs.s3a.endpoint": "http://<RELEASE_NAME>-s3g-rest.<NAMESPACE>.svc.cluster.local:9878"
# With Kerberos: reads the key from ozone-s3-credentials.
s3Credentials:
secretName: ozone-s3-credentials
accessKeyKey: aws_access_key_id
secretKeyKey: aws_secret_access_key
With Ozone security off, keep the default s3-credentials Secret (keys access-key and secret-key) and create it with any pair.
The ozone-s3-credentials Secret only exists with Ozone security on, and only in the Ozone namespace: for a release in another namespace, copy it as in scenario 1. The details of each chart are in Integrations - Spark, S3 keys through a Secret in Spark, Security - Iceberg and Security - Delta Lake.
The warehouse in an Ozone bucket.
The lakehouse charts (Spark, Iceberg, Delta Lake and Trino) expect the Hive Metastore warehouse on S3. By default, the Hive Metastore keeps the warehouse on a local volume. With metastore.type: s3, it uses an Ozone bucket, and the local volume is no longer created. The bucket must exist before the Hive Metastore installation.
metastore.type: file: the warehouse on a PVC of the Hive Metastore itself.
metastore.type: s3, the warehouse at s3a://warehouse/hive and the keys read from a Secret.
The metastore warehouse in a bucket
- Trino. The hive and iceberg catalogs read and write to Ozone through Trino's native S3. It does not need a Kerberos ticket. (
tdp-trino.catalogs) - Spark. Writes and reads through S3A, with the endpoint and keys from the core-site.xml generated by the chart. It does not need a Kerberos ticket. (
tdp-spark.hadoopConfig) - Iceberg and Delta Lake. The maintenance CronJobs read the endpoint from maintenance.spark.config and the keys from a Secret. It does not need a Kerberos ticket. (
maintenance.spark.s3Credentials) - Hive Metastore. With metastore.type s3, the warehouse lives in an Ozone bucket, and not on a local volume. It does not need a Kerberos ticket. (
tdp-hive-metastore.metastore.s3) - Airflow and ClickHouse. Each one receives a generic S3 connection, with the address and the keys, in TDP-Settings.s3Connection. It does not need a Kerberos ticket. (
TDP-Settings.s3Connection) - Jupyter. The NetworkPolicy of the notebook pods already allows the Ozone ports. It does not need a Kerberos ticket. (
tdp-jupyter.singleuser.networkPolicy.egress) - AWS CLI and SDKs. Any S3 client: endpoint, region and the keys. It does not need a Kerberos ticket.
- ozone-s3-credentials Secret. With security on, the chart creates this Secret and fills it with the administrator key, issued by the Ozone Manager, in the aws_access_key_id and aws_secret_access_key keys. Per-application keys are also issued by the Ozone Manager (scenario 4 of the security page). The Secret exists only in the Ozone namespace: a consumer in another namespace receives a copy (scenario 1). Chart default:
security off. (tdp-ozone.s3g.auth.secretName) - S3 Gateway. The S3 endpoint for all consumers, in the internal Service <RELEASE_NAME>-s3g-rest. Clients use path-style and the us-east-1 region. Chart default:
port in s3g.service.rest.port. (tdp-ozone.s3g.service.rest.port) - Buckets. The TDP charts keep their data in the warehouse bucket: the Hive Metastore warehouse, the Iceberg and Delta Lake tables and the Spark event logs. Create it before installing those charts.
1tdp-hive-metastore:2metastore:3 type: s34 s3:5 warehouseDir: s3a://warehouse/hive6 bucket: warehouse7 endpoint: http://<RELEASE_NAME>-s3g-rest.<NAMESPACE>.svc.cluster.local:98788 # With Kerberos: reads the key from ozone-s3-credentials.9 existingSecret: ozone-s3-credentials10 existingSecretAccessKeyKey: aws_access_key_id11 existingSecretSecretKeyKey: aws_secret_access_key
In place of the local volume. The warehouse PVC is no longer created.
- Warehouse on S3 (linha 3). In place of the local volume. The warehouse PVC is no longer created.
- Bucket (linha 6). Create it before the installation, as in scenario 1.
- Endpoint (linha 7). The Ozone S3 Gateway Service.
- Keys Secret (linha 9). With Ozone security on, the ozone-s3-credentials Secret, copied to the Hive Metastore namespace if it is a different one (scenario 1). With it off, use accessKey and secretKey with any pair instead of existingSecret, or a Secret of your own.
- Key names in the Secret (linha 10). Those of the ozone-s3-credentials Secret. In a Secret of your own, the names you used.
How to create the Secret when you do not use ozone-s3-credentials is in Hive Metastore S3 credentials.
The S3 connection of each chart, pointed at Ozone.
The Airflow and ClickHouse charts each have a generic S3 connection in TDP-Settings.s3Connection, which serves any S3-compatible storage. To use Ozone, the connection receives the endpoint and keys from scenario 1. In Airflow, the connection becomes an Airflow connection, used by the DAGs. In ClickHouse, it serves the Job that creates the bucket, and ClickHouse uses S3 through its own configuration.
TDP-Settings.s3Connection.enabled: false.
uri with the S3 Gateway endpoint, and accessKey and secretKey with the keys from scenario 1.
Airflow and ClickHouse on the S3 Gateway
- Trino. The hive and iceberg catalogs read and write to Ozone through Trino's native S3. It does not need a Kerberos ticket. (
tdp-trino.catalogs) - Spark. Writes and reads through S3A, with the endpoint and keys from the core-site.xml generated by the chart. It does not need a Kerberos ticket. (
tdp-spark.hadoopConfig) - Iceberg and Delta Lake. The maintenance CronJobs read the endpoint from maintenance.spark.config and the keys from a Secret. It does not need a Kerberos ticket. (
maintenance.spark.s3Credentials) - Hive Metastore. With metastore.type s3, the warehouse lives in an Ozone bucket, and not on a local volume. It does not need a Kerberos ticket. (
tdp-hive-metastore.metastore.s3) - Airflow and ClickHouse. Each one receives a generic S3 connection, with the address and the keys, in TDP-Settings.s3Connection. It does not need a Kerberos ticket. (
TDP-Settings.s3Connection) - Jupyter. The NetworkPolicy of the notebook pods already allows the Ozone ports. It does not need a Kerberos ticket. (
tdp-jupyter.singleuser.networkPolicy.egress) - AWS CLI and SDKs. Any S3 client: endpoint, region and the keys. It does not need a Kerberos ticket.
- Keys with security off. With security off, the S3 Gateway accepts any non-empty key pair, and the chart creates no keys Secret. Chart default:
security off. (tdp-ozone.s3g.auth.secretName) - S3 Gateway. The S3 endpoint for all consumers, in the internal Service <RELEASE_NAME>-s3g-rest. Clients use path-style and the us-east-1 region. Chart default:
port in s3g.service.rest.port. (tdp-ozone.s3g.service.rest.port) - Buckets. The TDP charts keep their data in the warehouse bucket: the Hive Metastore warehouse, the Iceberg and Delta Lake tables and the Spark event logs. Create it before installing those charts.
With Ozone security on, the keys go in literally in accessKey and secretKey: read them from the ozone-s3-credentials Secret in the Ozone namespace, as in the Get the keys step of scenario 1.
The complete blocks are in Integrations - Airflow and in Integrations - ClickHouse.
Jupyter, AWS CLI and SDKs.
Besides the lakehouse charts, other tools read and write to Ozone like any S3 client: Jupyter notebooks and the AWS CLI or SDKs. Each one receives the endpoint, region and keys from scenario 1.
The NetworkPolicy of the notebook pods already allows the Ozone ports. With Ozone security turned on by the GitOps kit, the Spark drivers run in Jupyter must obtain, themselves, the keys from the ozone-s3-credentials Secret.
Notebooks and S3 clients on the S3 Gateway
- Trino. The hive and iceberg catalogs read and write to Ozone through Trino's native S3. It does not need a Kerberos ticket. (
tdp-trino.catalogs) - Spark. Writes and reads through S3A, with the endpoint and keys from the core-site.xml generated by the chart. It does not need a Kerberos ticket. (
tdp-spark.hadoopConfig) - Iceberg and Delta Lake. The maintenance CronJobs read the endpoint from maintenance.spark.config and the keys from a Secret. It does not need a Kerberos ticket. (
maintenance.spark.s3Credentials) - Hive Metastore. With metastore.type s3, the warehouse lives in an Ozone bucket, and not on a local volume. It does not need a Kerberos ticket. (
tdp-hive-metastore.metastore.s3) - Airflow and ClickHouse. Each one receives a generic S3 connection, with the address and the keys, in TDP-Settings.s3Connection. It does not need a Kerberos ticket. (
TDP-Settings.s3Connection) - Jupyter. The NetworkPolicy of the notebook pods already allows the Ozone ports. It does not need a Kerberos ticket. (
tdp-jupyter.singleuser.networkPolicy.egress) - AWS CLI and SDKs. Any S3 client: endpoint, region and the keys. It does not need a Kerberos ticket.
- Keys with security off. With security off, the S3 Gateway accepts any non-empty key pair, and the chart creates no keys Secret. Chart default:
security off. (tdp-ozone.s3g.auth.secretName) - S3 Gateway. The S3 endpoint for all consumers, in the internal Service <RELEASE_NAME>-s3g-rest. Clients use path-style and the us-east-1 region. Chart default:
port in s3g.service.rest.port. (tdp-ozone.s3g.service.rest.port) - Buckets. The TDP charts keep their data in the warehouse bucket: the Hive Metastore warehouse, the Iceberg and Delta Lake tables and the Spark event logs. Create it before installing those charts.
AWS CLI and Python (boto3)
Any S3 client works with path-style, the us-east-1 region and the endpoint: the one from scenario 1 inside the cluster, or the address published by the Ingress from outside it.
export AWS_ENDPOINT_URL=http://<RELEASE_NAME>-s3g-rest.<NAMESPACE>.svc.cluster.local:9878
aws s3 ls
import boto3
s3 = boto3.client(
"s3",
endpoint_url="http://<RELEASE_NAME>-s3g-rest.<NAMESPACE>.svc.cluster.local:9878",
aws_access_key_id="<AWS_ACCESS_KEY_ID>",
aws_secret_access_key="<AWS_SECRET_ACCESS_KEY>",
region_name="us-east-1",
)
print([b["Name"] for b in s3.list_buckets()["Buckets"]])
The AWS Signature v4 signature depends on the time: keep the clocks of the clients and the cluster in sync.
The Jupyter details are in Integrations - Jupyter.
When something goes wrong
Troubleshooting
Paste the error message or pick the symptom. The answer comes with the cause, what to do and the command.
- Unable to locate credentials or connection refused. Cause: The client has no key configured, or the S3 Gateway is not reachable at the address used. What to do: Check the client keys, the S3 Gateway pod and, from outside the cluster, the Ingress.
- SignatureDoesNotMatch. Cause: Clock skew between the client and the pods (the AWS SigV4 signature depends on the time) or an outdated key. What to do: Check the time on the client and on the pods. With Kerberos on, read the key from the ozone-s3-credentials Secret again.
- AccessDenied with a valid key. Cause: With security on, the key authenticated, but the user has no ACL on the /s3v volume. Only the administrator gets it automatically. What to do: After kinit, grant the ACL to the key user with addacl, as in scenario 4 of the security page.
- AccessDenied or InvalidAccessKeyId after turning Kerberos on. Cause: The client still uses a key that the Ozone Manager did not issue. What to do: Give the client the key from the ozone-s3-credentials Secret or a new key (scenario 4 of the security page) and restart its pods.
- Writes fail with HTTP 500 on a single datanode. Cause: The client asks for the STANDARD class, which the S3 Gateway translates into more replicas than a single datanode can hold. Trino asks for STANDARD by default. What to do: In Trino, s3.storage-class=REDUCED_REDUNDANCY in the catalogs (scenario 2). The AWS CLI and Spark S3A do not ask for a class.
- Consumers in CreateContainerConfigError (GitOps kit). Cause: The consumers started before the Ozone PostSync Job filled the ozone-s3-credentials Secret. What to do: Wait: they start on their own when the Secret is filled. Pods that were already running with the old keys need a restart.
- Another problem. Cause: Start with the state of the pods, the Services and the events of the Ozone namespace. What to do: The events in time order show what keeps the pod from starting.
Next steps
Security
Security - Apache Ozone
Keys that Ozone validates, a key per application and TLS on the endpoint.
Configuration
Apache Ozone Configuration
First installation, OpenShift, disks and publishing at a URL.
