Distributed data processing
with Spark.
Five common scenarios, from the first installation to application history. Each one covers: what the chart already provides, what changes in the cluster, the values file commented line by line, and a step-by-step with verification.
The tdp-spark chart starts Apache Spark in standalone mode, with Spark's own cluster manager: a master, which receives applications, and workers, where the executors run, the processes that carry out each application's work. The S3A, Iceberg and Delta Lake jars already come in the image. Sizing, history, access and integrations are your decisions, and each scenario below addresses one of them. For the architecture, see Apache Spark - Concepts.
Your environment
If you fill in your environment details here, this page's examples and commands use the values you provided. The namespace, the release name and the values file are your choices, not the chart's.
Scenarios
- 1 · First contact
- 2 · Sizing
- 3 · History
- 4 · Publish at a URL
- 5 · Integrate
Install with chart defaults, open the master interface and submit the example from the image.
This tab installs Spark with the chart defaults, without a values file, opens the master interface from your machine and submits the example included in the image. What starts is a master, which receives applications, and workers, where applications run.
Each Spark application has a driver, the process that runs the main program and splits the work into tasks, and executors, the processes that carry out those tasks on the workers.
You want to see Spark working before deciding about resources, storage or access. Everything shown here is what the chart provides by itself. The other scenarios start from this state.
One master and the workers from spark.worker.replicaCount, in standalone mode. HPA disabled (spark.worker.autoscaling.enabled).
Requests and limits in spark.master.resources and spark.worker.resources. Executor and driver sizes in customSparkConfig.properties (values in All parameters).
Internal master Service (ClusterIP), with the web interface on the spark.service.ports.http port and application submission on spark.service.ports.cluster. No Ingress.
fs.defaultFS points to the warehouse bucket through S3A, without an endpoint or keys: S3 access is enabled in scenario 5.
History Server and event logs disabled. Scenario 3 enables both.
S3A jars on the driver and executor classpath. Iceberg and Delta Lake disabled.
What starts in the namespace with chart defaults
- Users. Without external exposure, each person opens a tunnel from their own machine to the master Service with kubectl port-forward. Chart default:
no external exposure (port-forward). - Master Service. The master's internal address in the cluster: the web interface on the spark.service.ports.http port, and application submission on spark.service.ports.cluster. The name is <RELEASE_NAME>-spark-master-svc, or <RELEASE_NAME>-master-svc when the release name already contains spark. Chart default:
ClusterIP. (spark.service.ports.http · spark.service.ports.cluster) - Master. Receives submitted applications and distributes their executors among workers. Chart default:
requests and limits in spark.master.resources. (spark.master.resources) - Workers. Run application executors. The count is fixed, from spark.worker.replicaCount. An executor is only scheduled on a worker with the memory and cores it requests. Chart default:
count in spark.worker.replicaCount · HPA disabled · requests and limits in spark.worker.resources. (spark.worker.replicaCount · spark.worker.resources) - Spark History Server. The chart's own History Server, disabled by default. With it disabled, event logs are also disabled. Chart default:
disabled. (spark.historyServer.enabled) - core-site.xml. Hadoop properties, such as S3A settings, generated from hadoopConfig and mounted in the master and workers. Chart default:
fs.defaultFS in the warehouse bucket, no endpoint or keys. (tdp-spark.hadoopConfig) - spark-defaults.conf. Spark properties generated from customSparkConfig.properties, plus lines the chart adds for the classpath, integrations and History Server. Chart default:
event logs disabled; executor and driver sizes. (tdp-spark.customSparkConfig.properties) - Image jars. The S3A, Iceberg and Delta Lake jars are already in the image. The chart always adds S3A jars to the driver and executor classpath, and adds Iceberg and Delta Lake jars when you enable them. Chart default:
S3A on the classpath; Iceberg and Delta Lake disabled. (tdp-spark.bundledJars)
Check the TDP license
The chart requires a valid TDP license installed in the cluster.
kubectl get platformlicenses -A
Success criteria
Create the registry pull Secret
The Spark image comes from the Tecnisys registry, which requires login.
The tdp-registry Secret must exist in the release namespace before installation. If the namespace does not exist yet, create it first with kubectl create namespace <NAMESPACE>.
kubectl -n <NAMESPACE> create secret docker-registry tdp-registry \
--docker-server=registry.tecnisys.com.br \
--docker-username=<REGISTRY_USERNAME> --docker-password=<REGISTRY_CLI_SECRET>
Success criteria
kubectl -n <NAMESPACE> get secret tdp-registry
The Secret appears in the namespace. Without it, pods remain in ImagePullBackOff. Where to obtain the registry username and password: Prerequisites.
Install with defaults
Without a values file, the chart starts exactly as in the figure above.
helm install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-spark \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace
--version installs the chart version for this documentation. Without it, Helm installs the latest version published in the registry.
On OpenShift, the command is the same: the restricted-v2 SCC assigns pod UIDs and GIDs according to global.compatibility.openshift.adaptSecurityContext (details in Security - Spark).
Success criteria
kubectl -n <NAMESPACE> get pods -l app.kubernetes.io/name=spark
The master and workers reach Running.
If a pod does not start
Namespace events, in chronological order, show the reason:
kubectl -n <NAMESPACE> get events --sort-by=.lastTimestamp
Then look up the message in When something goes wrong.
Open the master interface from your machine
Without external exposure, kubectl opens a tunnel from your machine to the master Service.
The master Service is named <RELEASE_NAME>-spark-master-svc, or <RELEASE_NAME>-master-svc when the release name already contains spark. With release spark, it is spark-master-svc, and the master pod is spark-master-0. The release's Services appear with:
kubectl -n <NAMESPACE> get svc -l app.kubernetes.io/instance=<RELEASE_NAME>
kubectl -n <NAMESPACE> port-forward svc/<SPARK_MASTER_SERVICE> 8080:80
Success criteria
http://localhost:8080 and lists workers.Submit the example from the image
SparkPi, included in the image, runs in the cluster from the master pod.
The master serves through the Service, not localhost. sh -c expands the jar name inside the pod:
kubectl -n <NAMESPACE> exec \
$(kubectl -n <NAMESPACE> get pod -l app.kubernetes.io/component=master -o jsonpath='{.items[0].metadata.name}') \
-- sh -c 'spark-submit --master spark://<SPARK_MASTER_SERVICE>:7077 \
--class org.apache.spark.examples.SparkPi \
/opt/bitnami/spark/examples/jars/spark-examples_*.jar 10'
Success criteria
spark-submit finishes without error and the application appears among completed applications in the master interface.If the application keeps waiting and never runs
An executor requesting more memory or cores than a worker offers is never scheduled. See the rule in scenario 2.
Worker resources, fixed count or HPA, and executors that fit in workers.
This tab adjusts three interdependent things: each worker's CPU and memory (and the master's), the worker count and the executor and driver sizes each application requests.
By default, the worker count is fixed: the chart starts the count from spark.worker.replicaCount, with HPA disabled. What decides the count is your choice, further below. Worker resources and executor sizes also come with chart defaults and do not follow the load: when applications grow, you adjust them. The rule that ties the two sides together: an executor is only scheduled on a worker with the memory and cores it requests.
Applications have grown and you want more execution capacity, or you have seen an application wait forever without receiving executors.
Count in spark.worker.replicaCount. Requests and limits in spark.worker.resources. HPA disabled, with minimum, maximum, CPU and memory targets already set in spark.worker.autoscaling.
spark.executor.instances, spark.executor.cores, spark.executor.memory, spark.driver.memory and spark.driver.cores, within tdp-spark.customSparkConfig.properties, sized to fit default workers.
The number of workers: fixed or through the HPA
What determines the worker count
- Users. Without external exposure, each person opens a tunnel from their own machine to the master Service with kubectl port-forward. Chart default:
no external exposure (port-forward). - Master Service. The master's internal address in the cluster: the web interface on the spark.service.ports.http port, and application submission on spark.service.ports.cluster. The name is <RELEASE_NAME>-spark-master-svc, or <RELEASE_NAME>-master-svc when the release name already contains spark. Chart default:
ClusterIP. (spark.service.ports.http · spark.service.ports.cluster) - Master. Receives submitted applications and distributes their executors among workers. Chart default:
requests and limits in spark.master.resources. (spark.master.resources) - Workers. Run application executors. The count is fixed, from spark.worker.replicaCount. An executor is only scheduled on a worker with the memory and cores it requests. Chart default:
count in spark.worker.replicaCount · HPA disabled · requests and limits in spark.worker.resources. (spark.worker.replicaCount · spark.worker.resources) - Spark History Server. The chart's own History Server, disabled by default. With it disabled, event logs are also disabled. Chart default:
disabled. (spark.historyServer.enabled) - core-site.xml. Hadoop properties, such as S3A settings, generated from hadoopConfig and mounted in the master and workers. Chart default:
fs.defaultFS in the warehouse bucket, no endpoint or keys. (tdp-spark.hadoopConfig) - spark-defaults.conf. Spark properties generated from customSparkConfig.properties, plus lines the chart adds for the classpath, integrations and History Server. Chart default:
event logs disabled; executor and driver sizes. (tdp-spark.customSparkConfig.properties) - Image jars. The S3A, Iceberg and Delta Lake jars are already in the image. The chart always adds S3A jars to the driver and executor classpath, and adds Iceberg and Delta Lake jars when you enable them. Chart default:
S3A on the classpath; Iceberg and Delta Lake disabled. (tdp-spark.bundledJars)
What determines the worker count: Fixed count (default)
- Users. Without external exposure, each person opens a tunnel from their own machine to the master Service with kubectl port-forward. Chart default:
no external exposure (port-forward). - Master Service. The master's internal address in the cluster: the web interface on the spark.service.ports.http port, and application submission on spark.service.ports.cluster. The name is <RELEASE_NAME>-spark-master-svc, or <RELEASE_NAME>-master-svc when the release name already contains spark. Chart default:
ClusterIP. (spark.service.ports.http · spark.service.ports.cluster) - Master. Receives submitted applications and distributes their executors among workers. Chart default:
requests and limits in spark.master.resources. (spark.master.resources) - Workers. Run application executors. The count is fixed, from spark.worker.replicaCount. An executor is only scheduled on a worker with the memory and cores it requests. Chart default:
count in spark.worker.replicaCount · HPA disabled · requests and limits in spark.worker.resources. (spark.worker.replicaCount · spark.worker.resources) - Spark History Server. The chart's own History Server, disabled by default. With it disabled, event logs are also disabled. Chart default:
disabled. (spark.historyServer.enabled) - core-site.xml. Hadoop properties, such as S3A settings, generated from hadoopConfig and mounted in the master and workers. Chart default:
fs.defaultFS in the warehouse bucket, no endpoint or keys. (tdp-spark.hadoopConfig) - spark-defaults.conf. Spark properties generated from customSparkConfig.properties, plus lines the chart adds for the classpath, integrations and History Server. Chart default:
event logs disabled; executor and driver sizes. (tdp-spark.customSparkConfig.properties) - Image jars. The S3A, Iceberg and Delta Lake jars are already in the image. The chart always adds S3A jars to the driver and executor classpath, and adds Iceberg and Delta Lake jars when you enable them. Chart default:
S3A on the classpath; Iceberg and Delta Lake disabled. (tdp-spark.bundledJars)
What determines the worker count: HPA
- Users. Without external exposure, each person opens a tunnel from their own machine to the master Service with kubectl port-forward. Chart default:
no external exposure (port-forward). - Master Service. The master's internal address in the cluster: the web interface on the spark.service.ports.http port, and application submission on spark.service.ports.cluster. The name is <RELEASE_NAME>-spark-master-svc, or <RELEASE_NAME>-master-svc when the release name already contains spark. Chart default:
ClusterIP. (spark.service.ports.http · spark.service.ports.cluster) - Master. Receives submitted applications and distributes their executors among workers. Chart default:
requests and limits in spark.master.resources. (spark.master.resources) - Workers. Run application executors. The HPA creates and removes workers according to CPU and memory usage, between spark.worker.autoscaling.minReplicas and maxReplicas. An executor is only scheduled on a worker with the memory and cores it requests. Chart default:
count in spark.worker.replicaCount · HPA disabled · requests and limits in spark.worker.resources. (spark.worker.replicaCount · spark.worker.resources) - HPA (Horizontal Pod Autoscaler). Native Kubernetes resource that creates and removes pods according to CPU and memory usage, measured by Metrics Server. Requires requests configured on workers. Chart default:
disabled. (spark.worker.autoscaling.enabled: true) - Spark History Server. The chart's own History Server, disabled by default. With it disabled, event logs are also disabled. Chart default:
disabled. (spark.historyServer.enabled) - core-site.xml. Hadoop properties, such as S3A settings, generated from hadoopConfig and mounted in the master and workers. Chart default:
fs.defaultFS in the warehouse bucket, no endpoint or keys. (tdp-spark.hadoopConfig) - spark-defaults.conf. Spark properties generated from customSparkConfig.properties, plus lines the chart adds for the classpath, integrations and History Server. Chart default:
event logs disabled; executor and driver sizes. (tdp-spark.customSparkConfig.properties) - Image jars. The S3A, Iceberg and Delta Lake jars are already in the image. The chart always adds S3A jars to the driver and executor classpath, and adds Iceberg and Delta Lake jars when you enable them. Chart default:
S3A on the classpath; Iceberg and Delta Lake disabled. (tdp-spark.bundledJars)
Fixed count, the default. The chart starts the worker count in spark.worker.replicaCount, and nothing adjusts it for you. For more capacity, increase this count or each worker's resources.
Fixed count: Best suited when the cluster does not have Metrics Server or the workers have no requests configured, the two HPA prerequisites.
HPA. The Horizontal Pod Autoscaler is the native Kubernetes resource that creates and removes pods according to CPU and memory usage, measured by Metrics Server. When enabled, it keeps workers between spark.worker.autoscaling.minReplicas and maxReplicas, according to targetCPU and targetMemory. Two prerequisites: Metrics Server installed in the cluster and worker requests configured in spark.worker.resources.requests.
HPA: Best suited when you want the worker count to follow their CPU and memory usage and the cluster has Metrics Server.
The executor rule
Each worker advertises slightly less memory to the master than its container limit, and the worker process itself uses part of that memory. An executor requesting more than the worker advertises is never scheduled, and the application waits forever. That is why spark.executor.memory and spark.executor.cores go hand in hand with worker memory and CPU limits: when changing one side, check the other. The difference between the limit and what the worker advertises is in All parameters.
The values file
Worker resources belong in the spark block, at the root of the values file. The example values are the defaults themselves: replace them with the size you need.
1spark:2worker:3 replicaCount: 24 resources:5 requests:6 cpu: 17 memory: 1Gi8 limits:9 cpu: 210 memory: 4Gi11master:12 resources:13 requests:14 cpu: 115 memory: 1Gi16 limits:17 cpu: 218 memory: 2Gi
The chart is an umbrella: master, workers, History Server and image belong in the spark block at the root of the values file. TDP configuration (core-site.xml, spark-defaults.conf, integrations) belongs in the tdp-spark.
- Spark block (linha 1). The chart is an umbrella: master, workers, History Server and image belong in the spark block at the root of the values file. TDP configuration (core-site.xml, spark-defaults.conf, integrations) belongs in the tdp-spark.
- Worker count (linha 3). How many workers the chart starts at installation.
- requests (linha 5). What Kubernetes reserves for each worker.
- Worker memory (linha 10). The worker advertises less memory to the master than this limit, and the worker process uses part of it in the same container. The difference is in All parameters.
- Master (linha 11). The master receives applications and distributes executors among workers.
Executors and the driver belong in tdp-spark.customSparkConfig.properties, which is a single text string: defining it in your file replaces the chart's entire default content. Start with a copy of the default content, obtained from this command, and adjust the executor and driver lines:
helm show values oci://registry.tecnisys.com.br/tdp/charts/tdp-spark --version 3.0.3
1tdp-spark:2customSparkConfig:3 properties: |4 # ... default content copied from the chart, with these lines adjusted:5 spark.executor.instances 26 spark.executor.cores 27 spark.executor.memory 2g8 spark.driver.memory 2g9 spark.driver.cores 1
spark-defaults.conf is generated from this block under the chart key.
- TDP block (linha 1). spark-defaults.conf is generated from this block under the chart key.
- Single text string (linha 3). properties is text, not a map: yours replaces the chart's entirely. Without copying the default content, the chart's other lines are lost.
- Executors per application (linha 5). How many executors each application requests.
- Executor memory (linha 7). Must fit what a worker advertises, which is less than the worker memory limit. An executor requesting more is never scheduled.
- Driver (linha 8). Driver memory and cores.
1spark:2worker:3 replicaCount: 24 autoscaling:5 enabled: true6 minReplicas: 27 maxReplicas: 108 targetCPU: 709 targetMemory: 80
Optional with autoscaling enabled.
- Initial workers (linha 3). Optional with autoscaling enabled.
- Enables HPA (linha 5). HPA starts creating and removing workers.
- Range (linha 6). Minimum and maximum workers.
- Targets (linha 8). CPU and memory usage percentages that trigger scaling.
Write the values file
Combine the blocks above, adjusted for your cluster, in a single file.
If you already have a Spark values file, add the blocks to it.
Apply to the release
The same command installs and upgrades.
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-spark \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace \
-f <VALUES_FILE>
Success criteria
kubectl -n <NAMESPACE> get pods -l app.kubernetes.io/name=spark
Workers reach Running in the expected count, and the master interface lists all of them.
If the application keeps waiting
The executor still requests more than a worker advertises. Reduce spark.executor.memory or increase the worker memory limit. See When something goes wrong.
Enable History Server with event logs in S3 or on a shared volume.
This tab enables Spark History Server, the interface that shows applications that have already finished, and decides where the event logs are stored, the records that drivers write and History Server reads. Both need to use the same directory.
The chart provides its own History Server, disabled by default, and with it disabled, event logs are also disabled: a driver does not start when its event log directory does not exist. When enabling it, choose where event logs are stored: in an S3 bucket, the default, or on a shared persistent volume.
You want to inspect applications that have already finished.
History Server disabled (spark.historyServer.enabled) and spark.eventLog.enabled false in the default customSparkConfig.properties content.
A Deployment and a Service, with the port in spark.historyServer.service.port. The chart adds spark.eventLog.* lines for the chosen directory to spark-defaults.conf, overriding spark.eventLog.enabled false.
With event logs in S3: the S3 endpoint and keys in hadoopConfig and an existing bucket. With event logs on a PVC: a StorageClass with ReadWriteMany if the master and workers can run on different nodes.
Where the drivers write the event logs
Where event logs are stored
- Users. Without external exposure, each person opens a tunnel from their own machine to the master Service with kubectl port-forward. Chart default:
no external exposure (port-forward). - Master Service. The master's internal address in the cluster: the web interface on the spark.service.ports.http port, and application submission on spark.service.ports.cluster. The name is <RELEASE_NAME>-spark-master-svc, or <RELEASE_NAME>-master-svc when the release name already contains spark. Chart default:
ClusterIP. (spark.service.ports.http · spark.service.ports.cluster) - Master. Receives submitted applications and distributes their executors among workers. Chart default:
requests and limits in spark.master.resources. (spark.master.resources) - Workers. Run application executors. The count is fixed, from spark.worker.replicaCount. An executor is only scheduled on a worker with the memory and cores it requests. Chart default:
count in spark.worker.replicaCount · HPA disabled · requests and limits in spark.worker.resources. (spark.worker.replicaCount · spark.worker.resources) - Spark History Server. The chart's own History Server, disabled by default. With it disabled, event logs are also disabled. Chart default:
disabled. (spark.historyServer.enabled) - core-site.xml. Hadoop properties, such as S3A settings, generated from hadoopConfig and mounted in the master and workers. Chart default:
fs.defaultFS in the warehouse bucket, no endpoint or keys. (tdp-spark.hadoopConfig) - spark-defaults.conf. Spark properties generated from customSparkConfig.properties, plus lines the chart adds for the classpath, integrations and History Server. Chart default:
event logs disabled; executor and driver sizes. (tdp-spark.customSparkConfig.properties) - Image jars. The S3A, Iceberg and Delta Lake jars are already in the image. The chart always adds S3A jars to the driver and executor classpath, and adds Iceberg and Delta Lake jars when you enable them. Chart default:
S3A on the classpath; Iceberg and Delta Lake disabled. (tdp-spark.bundledJars)
Where event logs are stored: S3 bucket (default)
- Users. Without external exposure, each person opens a tunnel from their own machine to the master Service with kubectl port-forward. Chart default:
no external exposure (port-forward). - Master Service. The master's internal address in the cluster: the web interface on the spark.service.ports.http port, and application submission on spark.service.ports.cluster. The name is <RELEASE_NAME>-spark-master-svc, or <RELEASE_NAME>-master-svc when the release name already contains spark. Chart default:
ClusterIP. (spark.service.ports.http · spark.service.ports.cluster) - Master. Receives submitted applications and distributes their executors among workers. Chart default:
requests and limits in spark.master.resources. (spark.master.resources) - Workers. Run application executors. The count is fixed, from spark.worker.replicaCount. An executor is only scheduled on a worker with the memory and cores it requests. Chart default:
count in spark.worker.replicaCount · HPA disabled · requests and limits in spark.worker.resources. (spark.worker.replicaCount · spark.worker.resources) - Spark History Server. Reads event logs written by drivers and shows completed applications. When enabled, the chart adds lines to spark-defaults.conf that make this chart's drivers write to the same directory. Chart default:
disabled. (spark.historyServer.enabled) - S3-compatible storage. The Ozone S3 Gateway or another S3-compatible endpoint, accessed through S3A. The endpoint and keys have no defaults. Event logs are stored in the spark.historyServer.eventLog.dir directory, and the bucket must exist. Chart default:
no endpoint or keys. (tdp-spark.hadoopConfig) - core-site.xml. Hadoop properties, such as S3A settings, generated from hadoopConfig and mounted in the master and workers. Chart default:
fs.defaultFS in the warehouse bucket, no endpoint or keys. (tdp-spark.hadoopConfig) - spark-defaults.conf. Spark properties generated from customSparkConfig.properties, plus lines the chart adds for the classpath, integrations and History Server. Chart default:
event logs disabled; executor and driver sizes. (tdp-spark.customSparkConfig.properties) - Image jars. The S3A, Iceberg and Delta Lake jars are already in the image. The chart always adds S3A jars to the driver and executor classpath, and adds Iceberg and Delta Lake jars when you enable them. Chart default:
S3A on the classpath; Iceberg and Delta Lake disabled. (tdp-spark.bundledJars)
Where event logs are stored: Persistent volume (PVC)
- Users. Without external exposure, each person opens a tunnel from their own machine to the master Service with kubectl port-forward. Chart default:
no external exposure (port-forward). - Master Service. The master's internal address in the cluster: the web interface on the spark.service.ports.http port, and application submission on spark.service.ports.cluster. The name is <RELEASE_NAME>-spark-master-svc, or <RELEASE_NAME>-master-svc when the release name already contains spark. Chart default:
ClusterIP. (spark.service.ports.http · spark.service.ports.cluster) - Master. Receives submitted applications and distributes their executors among workers. Chart default:
requests and limits in spark.master.resources. (spark.master.resources) - Workers. Run application executors. The count is fixed, from spark.worker.replicaCount. An executor is only scheduled on a worker with the memory and cores it requests. Chart default:
count in spark.worker.replicaCount · HPA disabled · requests and limits in spark.worker.resources. (spark.worker.replicaCount · spark.worker.resources) - Spark History Server. Reads event logs written by drivers and shows completed applications. When enabled, the chart adds lines to spark-defaults.conf that make this chart's drivers write to the same directory. Chart default:
disabled. (spark.historyServer.enabled) - Event logs PVC. Shared event logs volume, mounted in the History Server and, through your values file, in the master and workers. Remains in the cluster after helm uninstall. Chart default:
disabled; ReadWriteMany when enabled. (spark.historyServer.eventLog.persistence) - core-site.xml. Hadoop properties, such as S3A settings, generated from hadoopConfig and mounted in the master and workers. Chart default:
fs.defaultFS in the warehouse bucket, no endpoint or keys. (tdp-spark.hadoopConfig) - spark-defaults.conf. Spark properties generated from customSparkConfig.properties, plus lines the chart adds for the classpath, integrations and History Server. Chart default:
event logs disabled; executor and driver sizes. (tdp-spark.customSparkConfig.properties) - Image jars. The S3A, Iceberg and Delta Lake jars are already in the image. The chart always adds S3A jars to the driver and executor classpath, and adds Iceberg and Delta Lake jars when you enable them. Chart default:
S3A on the classpath; Iceberg and Delta Lake disabled. (tdp-spark.bundledJars)
Event logs in S3. Drivers write to the spark.historyServer.eventLog.dir directory in an S3 bucket, and History Server reads from there. Before History Server starts, an init container creates the directory. The endpoint and keys come from tdp-spark.hadoopConfig, as in Integrations - Spark, and the bucket must exist.
S3 bucket: Best suited when S3 access is already configured in hadoopConfig and the bucket exists.
1spark:2historyServer:3 enabled: true4 eventLog:5 dir: s3a://warehouse/spark-events67tdp-spark:8hadoopConfig:9 fs.s3a.endpoint: "http://<S3_ENDPOINT>:<S3_PORT>"10 fs.s3a.access.key: "<S3_ACCESS_KEY>"11 fs.s3a.secret.key: "<S3_SECRET_KEY>"
The chart creates the Deployment and Service and adds spark.eventLog.* lines to spark-defaults.conf.
- Enables History Server (linha 3). The chart creates the Deployment and Service and adds spark.eventLog.* lines to spark-defaults.conf.
- Directory (linha 5). The chart default. The bucket in the path must exist. The init container creates the directory.
- S3A (linha 8). S3 endpoint and keys, with no chart defaults. To move keys out of the file, use a Secret (Security - Spark).
Event logs on a PVC. The chart creates the spark-history-events PVC and mounts it in History Server. The master and workers must also mount it, and your values file does that.
Persistent volume: Best suited when S3 access is not configured and the cluster offers a StorageClass with ReadWriteMany.
Master and worker volume lists are replaced entirely, so they repeat chart entries and add event-logs. Use ReadWriteMany when these pods can run on different nodes. With a ReadWriteOnce StorageClass, set accessModes to ReadWriteOnce, and every pod using the volume goes to a single node.
1spark:2historyServer:3 enabled: true4 eventLog:5 persistence:6 enabled: true7 accessModes:8 - ReadWriteMany9 size: 10Gi10master:11 extraVolumeMounts:12 - name: hadoop-config13 mountPath: /opt/bitnami/spark/hadoop-conf14 readOnly: true15 - name: spark-artifacts16 mountPath: /opt/bitnami/spark/artifacts17 - name: custom-spark-defaults18 mountPath: /opt/bitnami/spark/conf/spark-defaults.conf19 subPath: spark-defaults.conf20 - name: event-logs21 mountPath: /opt/bitnami/spark/spark-events22 extraVolumes:23 - name: hadoop-config24 configMap:25 name: tdp-spark-hadoop-config26 - name: spark-artifacts27 emptyDir: {}28 - name: custom-spark-defaults29 configMap:30 name: spark-custom-defaults31 - name: event-logs32 persistentVolumeClaim:33 claimName: spark-history-events34worker:35 extraVolumeMounts:36 - name: hadoop-config37 mountPath: /opt/bitnami/spark/hadoop-conf38 readOnly: true39 - name: spark-artifacts40 mountPath: /opt/bitnami/spark/artifacts41 - name: custom-spark-defaults42 mountPath: /opt/bitnami/spark/conf/spark-defaults.conf43 subPath: spark-defaults.conf44 - name: event-logs45 mountPath: /opt/bitnami/spark/spark-events46 extraVolumes:47 - name: hadoop-config48 configMap:49 name: tdp-spark-hadoop-config50 - name: spark-artifacts51 emptyDir: {}52 - name: custom-spark-defaults53 configMap:54 name: spark-custom-defaults55 - name: event-logs56 persistentVolumeClaim:57 claimName: spark-history-events
Event logs are stored on the spark-history-events PVC, mounted in History Server.
- PVC instead of S3 (linha 6). Event logs are stored on the spark-history-events PVC, mounted in History Server.
- Access mode (linha 8). ReadWriteMany when History Server, master and workers can run on different nodes. With a ReadWriteOnce StorageClass, change to ReadWriteOnce.
- Entire list (linha 11). Helm replaces the chart list with yours: the first three entries repeat the chart entries.
- event-logs (linha 20). The new entry: the same PVC, at the same path where History Server mounts it.
- Workers (linha 34). The same two lists, with the same entries, in workers too.
Drivers running outside this chart's pods, such as Jupyter notebook and Airflow task drivers, only appear in History Server if they write to the same directory. See Integrations - Airflow.
Write the values file
The S3 or PVC block, according to the choice above.
If you already have a Spark values file, add the block to it.
Apply to the release
History Server starts and spark-defaults.conf enables event logs.
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-spark \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace \
-f <VALUES_FILE>
Success criteria
The helm output shows the event log directory, and the History Server pod reaches Running:
kubectl -n <NAMESPACE> get pods -l app.kubernetes.io/component=history-server
If History Server does not start
With event logs in S3, the endpoint, keys or bucket are missing. See When something goes wrong.
Open the History Server interface
Without external exposure, through port-forward to its Service.
The History Server Service has the master Service prefix, ending in -history instead of -master-svc: with release spark, spark-history. It appears among the release's Services:
kubectl -n <NAMESPACE> get svc -l app.kubernetes.io/instance=<RELEASE_NAME>
kubectl -n <NAMESPACE> port-forward svc/<SERVICE_NAME> 18080:18080
Success criteria
http://localhost:18080 and, after an application finishes, it appears in the list.Replace port-forward with a fixed address through Ingress or Gateway API, with the Spark reverse proxy.
This tab publishes the master's web interface at a fixed address, so the team can reach it from outside the cluster. With History Server enabled, its interface is published too, at its own hostname. By default, nothing is published: the interface is only reachable through port-forward, a tunnel each person opens from their machine with kubectl.
The chart publishes in two ways, and only one can be enabled. The first is Ingress, the Kubernetes resource that publishes a Service at a hostname through the cluster's Ingress controller. On OpenShift, the router publishes it as a Route. The second is Gateway API, with an HTTPRoute attached to a Gateway.
One extra setting is specific to Spark: the reverse proxy, already enabled, which gives access to the worker and application pages through the master's address, without opening other ports. It needs to know the public address.
None. Ingress and Gateway API disabled (TDP-Settings.gateway). The master Service is internal (ClusterIP).
Enabled in the master, workers and applications (spark.ui.reverseProxy), still without the public address.
When enabled, published at the hostname in spark.historyServer.ingress.hostname (Ingress) or gatewayApi.sparkHistory.hostnames (Gateway API).
How the team reaches Spark
How Spark is reached
- Users. Without external exposure, each person opens a tunnel from their own machine to the master Service with kubectl port-forward. Chart default:
no external exposure (port-forward). - Master Service. The master's internal address in the cluster: the web interface on the spark.service.ports.http port, and application submission on spark.service.ports.cluster. The name is <RELEASE_NAME>-spark-master-svc, or <RELEASE_NAME>-master-svc when the release name already contains spark. Chart default:
ClusterIP. (spark.service.ports.http · spark.service.ports.cluster) - Master. Receives submitted applications and distributes their executors among workers. Chart default:
requests and limits in spark.master.resources. (spark.master.resources) - Workers. Run application executors. The count is fixed, from spark.worker.replicaCount. An executor is only scheduled on a worker with the memory and cores it requests. Chart default:
count in spark.worker.replicaCount · HPA disabled · requests and limits in spark.worker.resources. (spark.worker.replicaCount · spark.worker.resources) - Spark History Server. Reads event logs written by drivers and shows completed applications. When enabled, the chart adds lines to spark-defaults.conf that make this chart's drivers write to the same directory. Chart default:
disabled. (spark.historyServer.enabled) - S3-compatible storage. The Ozone S3 Gateway or another S3-compatible endpoint, accessed through S3A. The endpoint and keys have no defaults. Event logs are stored in the spark.historyServer.eventLog.dir directory, and the bucket must exist. Chart default:
no endpoint or keys. (tdp-spark.hadoopConfig) - core-site.xml. Hadoop properties, such as S3A settings, generated from hadoopConfig and mounted in the master and workers. Chart default:
fs.defaultFS in the warehouse bucket, no endpoint or keys. (tdp-spark.hadoopConfig) - spark-defaults.conf. Spark properties generated from customSparkConfig.properties, plus lines the chart adds for the classpath, integrations and History Server. Chart default:
event logs disabled; executor and driver sizes. (tdp-spark.customSparkConfig.properties) - Image jars. The S3A, Iceberg and Delta Lake jars are already in the image. The chart always adds S3A jars to the driver and executor classpath, and adds Iceberg and Delta Lake jars when you enable them. Chart default:
S3A on the classpath; Iceberg and Delta Lake disabled. (tdp-spark.bundledJars)
How Spark is reached: port-forward (default)
- Users. Without external exposure, each person opens a tunnel from their own machine to the master Service with kubectl port-forward. Chart default:
no external exposure (port-forward). - Master Service. The master's internal address in the cluster: the web interface on the spark.service.ports.http port, and application submission on spark.service.ports.cluster. The name is <RELEASE_NAME>-spark-master-svc, or <RELEASE_NAME>-master-svc when the release name already contains spark. Chart default:
ClusterIP. (spark.service.ports.http · spark.service.ports.cluster) - Master. Receives submitted applications and distributes their executors among workers. Chart default:
requests and limits in spark.master.resources. (spark.master.resources) - Workers. Run application executors. The count is fixed, from spark.worker.replicaCount. An executor is only scheduled on a worker with the memory and cores it requests. Chart default:
count in spark.worker.replicaCount · HPA disabled · requests and limits in spark.worker.resources. (spark.worker.replicaCount · spark.worker.resources) - Spark History Server. Reads event logs written by drivers and shows completed applications. When enabled, the chart adds lines to spark-defaults.conf that make this chart's drivers write to the same directory. Chart default:
disabled. (spark.historyServer.enabled) - S3-compatible storage. The Ozone S3 Gateway or another S3-compatible endpoint, accessed through S3A. The endpoint and keys have no defaults. Event logs are stored in the spark.historyServer.eventLog.dir directory, and the bucket must exist. Chart default:
no endpoint or keys. (tdp-spark.hadoopConfig) - core-site.xml. Hadoop properties, such as S3A settings, generated from hadoopConfig and mounted in the master and workers. Chart default:
fs.defaultFS in the warehouse bucket, no endpoint or keys. (tdp-spark.hadoopConfig) - spark-defaults.conf. Spark properties generated from customSparkConfig.properties, plus lines the chart adds for the classpath, integrations and History Server. Chart default:
event logs disabled; executor and driver sizes. (tdp-spark.customSparkConfig.properties) - Image jars. The S3A, Iceberg and Delta Lake jars are already in the image. The chart always adds S3A jars to the driver and executor classpath, and adds Iceberg and Delta Lake jars when you enable them. Chart default:
S3A on the classpath; Iceberg and Delta Lake disabled. (tdp-spark.bundledJars)
How Spark is reached: Ingress
- Users. The team reaches the master interface, and the History Server interface when enabled, through fixed hostnames published by the Ingress. Chart default:
no external exposure (port-forward). - Master Service. The master's internal address in the cluster: the web interface on the spark.service.ports.http port, and application submission on spark.service.ports.cluster. The name is <RELEASE_NAME>-spark-master-svc, or <RELEASE_NAME>-master-svc when the release name already contains spark. Chart default:
ClusterIP. (spark.service.ports.http · spark.service.ports.cluster) - Ingress. The Ingress publishes the master Service at a hostname through the cluster's Ingress controller. With History Server enabled, the chart also creates its Ingress. Chart default:
disabled. (TDP-Settings.gateway.ingress.enabled · spark.ingress.enabled) - Master. Receives submitted applications and distributes their executors among workers. Chart default:
requests and limits in spark.master.resources. (spark.master.resources) - Workers. Run application executors. The count is fixed, from spark.worker.replicaCount. An executor is only scheduled on a worker with the memory and cores it requests. Chart default:
count in spark.worker.replicaCount · HPA disabled · requests and limits in spark.worker.resources. (spark.worker.replicaCount · spark.worker.resources) - Spark History Server. Reads event logs written by drivers and shows completed applications. When enabled, the chart adds lines to spark-defaults.conf that make this chart's drivers write to the same directory. Chart default:
disabled. (spark.historyServer.enabled) - S3-compatible storage. The Ozone S3 Gateway or another S3-compatible endpoint, accessed through S3A. The endpoint and keys have no defaults. Event logs are stored in the spark.historyServer.eventLog.dir directory, and the bucket must exist. Chart default:
no endpoint or keys. (tdp-spark.hadoopConfig) - core-site.xml. Hadoop properties, such as S3A settings, generated from hadoopConfig and mounted in the master and workers. Chart default:
fs.defaultFS in the warehouse bucket, no endpoint or keys. (tdp-spark.hadoopConfig) - spark-defaults.conf. Spark properties generated from customSparkConfig.properties, plus lines the chart adds for the classpath, integrations and History Server. Chart default:
event logs disabled; executor and driver sizes. (tdp-spark.customSparkConfig.properties) - Image jars. The S3A, Iceberg and Delta Lake jars are already in the image. The chart always adds S3A jars to the driver and executor classpath, and adds Iceberg and Delta Lake jars when you enable them. Chart default:
S3A on the classpath; Iceberg and Delta Lake disabled. (tdp-spark.bundledJars)
How Spark is reached: Gateway API
- Users. The team reaches the master interface, and the History Server interface when enabled, through fixed hostnames published by the HTTPRoute. Chart default:
no external exposure (port-forward). - Master Service. The master's internal address in the cluster: the web interface on the spark.service.ports.http port, and application submission on spark.service.ports.cluster. The name is <RELEASE_NAME>-spark-master-svc, or <RELEASE_NAME>-master-svc when the release name already contains spark. Chart default:
ClusterIP. (spark.service.ports.http · spark.service.ports.cluster) - HTTPRoute (Gateway API). The chart creates the HTTPRoute forwarding the Spark hostname to the master Service and, with History Server enabled, a second HTTPRoute for it. Both attach to the Gateway in gatewayApi.parentRefs. Chart default:
disabled. (TDP-Settings.gateway.gatewayApi.enabled · gatewayApi.spark.enabled) - Master. Receives submitted applications and distributes their executors among workers. Chart default:
requests and limits in spark.master.resources. (spark.master.resources) - Workers. Run application executors. The count is fixed, from spark.worker.replicaCount. An executor is only scheduled on a worker with the memory and cores it requests. Chart default:
count in spark.worker.replicaCount · HPA disabled · requests and limits in spark.worker.resources. (spark.worker.replicaCount · spark.worker.resources) - Spark History Server. Reads event logs written by drivers and shows completed applications. When enabled, the chart adds lines to spark-defaults.conf that make this chart's drivers write to the same directory. Chart default:
disabled. (spark.historyServer.enabled) - S3-compatible storage. The Ozone S3 Gateway or another S3-compatible endpoint, accessed through S3A. The endpoint and keys have no defaults. Event logs are stored in the spark.historyServer.eventLog.dir directory, and the bucket must exist. Chart default:
no endpoint or keys. (tdp-spark.hadoopConfig) - core-site.xml. Hadoop properties, such as S3A settings, generated from hadoopConfig and mounted in the master and workers. Chart default:
fs.defaultFS in the warehouse bucket, no endpoint or keys. (tdp-spark.hadoopConfig) - spark-defaults.conf. Spark properties generated from customSparkConfig.properties, plus lines the chart adds for the classpath, integrations and History Server. Chart default:
event logs disabled; executor and driver sizes. (tdp-spark.customSparkConfig.properties) - Image jars. The S3A, Iceberg and Delta Lake jars are already in the image. The chart always adds S3A jars to the driver and executor classpath, and adds Iceberg and Delta Lake jars when you enable them. Chart default:
S3A on the classpath; Iceberg and Delta Lake disabled. (tdp-spark.bundledJars)
port-forward. Nothing is created in the cluster. kubectl connects a port on your machine to the master Service port while the command is running. port-forward: Best suited when access is for testing and maintenance. For a team, choose Ingress or Gateway API above.
Ingress. The master Ingress comes from the spark.ingress block, enabled together with TDP-Settings.gateway.ingress.enabled. On OpenShift, the router publishes the Ingress as a Route. The same file supplies the public address to the master and worker reverse proxy. With History Server enabled, the chart also creates its Ingress, using the spark.ingress.ingressClassName class if spark.historyServer.ingress.ingressClassName is empty. Ingress: Best suited when the cluster already has an Ingress controller, or when it runs on OpenShift.
1spark:2ingress:3 enabled: true4 ingressClassName: <INGRESS_CLASS>5 hostname: <SPARK_HOSTNAME>6 path: /7 pathType: Prefix8master:9 configOptions: "-Dspark.ui.reverseProxy=true -Dspark.ui.reverseProxyUrl=http://<SPARK_HOSTNAME>"10worker:11 configOptions: "-Dspark.ui.reverseProxy=true -Dspark.ui.reverseProxyUrl=http://<SPARK_HOSTNAME>"1213TDP-Settings:14gateway:15 ingress:16 enabled: true17 gatewayApi:18 enabled: false
nginx, openshift-default or your cluster's class.
- Ingress class (linha 4). nginx, openshift-default or your cluster's class.
- Hostname (linha 5). On Kubernetes, something like spark.tdp.local. On OpenShift, spark-<NAMESPACE>.apps.<CLUSTER_DOMAIN>.
- Master reverse proxy (linha 9). reverseProxyUrl is the public address: with it, interface links such as Back to Master use the published hostname.
- Workers (linha 11). The same public address in workers.
- TDP-Settings (linha 13). Belongs at the file root, not under tdp-spark.
- Mutually exclusive (linha 17). Ingress and Gateway API cannot be enabled at the same time.
Gateway API. The chart creates the HTTPRoute forwarding the Spark hostname to the master Service and, with gatewayApi.gateway.enabled, also the Gateway, with the GatewayClass and listener you specify. When disabled, the HTTPRoute attaches to an existing Gateway specified in parentRefs. Gateway API: Best suited when the cluster uses the Gateway API, with a Gateway shared among services or with the Gateway the chart creates.
For HTTPS, TLS is configured on the Gateway listener, with protocol: HTTPS and the certificate reference. The HTTPRoute has no TLS configuration. With History Server enabled, the chart creates a second HTTPRoute for it, using the hostnames in gatewayApi.sparkHistory.hostnames.
1gatewayApi:2gatewayClassName: <GATEWAY_CLASS>3gateway:4 enabled: true5 name: <GATEWAY_NAME>6 listeners:7 - name: web8 port: 80009 protocol: HTTP10parentRefs:11 - name: <GATEWAY_NAME>12 namespace: <GATEWAY_NAMESPACE>13spark:14 enabled: true15 hostnames:16 - <SPARK_HOSTNAME>17 rules:18 - matches:19 - path:20 type: PathPrefix21 value: /22 backendRefs:23 - name: ""24 port: 802526spark:27master:28 configOptions: "-Dspark.ui.reverseProxy=true -Dspark.ui.reverseProxyUrl=http://<SPARK_HOSTNAME>"29worker:30 configOptions: "-Dspark.ui.reverseProxy=true -Dspark.ui.reverseProxyUrl=http://<SPARK_HOSTNAME>"3132TDP-Settings:33gateway:34 ingress:35 enabled: false36 gatewayApi:37 enabled: true
traefik, nginx or your cluster's GatewayClass.
- GatewayClass (linha 2). traefik, nginx or your cluster's GatewayClass.
- Chart Gateway (linha 4). true makes the chart create the Gateway. When disabled, the HTTPRoute attaches to an existing Gateway.
- Listener (linha 6). Where the Gateway receives traffic: name, port and protocol.
- parentRefs (linha 10). The Gateway to which HTTPRoutes attach, such as tdp-gateway in the tdp namespace.
- Hostname (linha 16). On Kubernetes, something like spark.tdp.local. On OpenShift, spark-<NAMESPACE>.apps.<CLUSTER_DOMAIN>.
- backendRefs (linha 23). The empty name is filled in by the chart with the master Service.
- Reverse proxy (linha 28). The same public address as the HTTPRoute, in the master and workers.
- TDP-Settings (linha 32). Enables the HTTPRoute and disables Ingress.
The reverse proxy in applications
The master and workers receive the public address through the blocks above. Applications also need it. Otherwise, navigating an application's interface tabs (stages, storage, executors, SQL) returns you to the home page instead of showing details. There are two ways: add spark.ui.reverseProxyUrl http://<SPARK_HOSTNAME> to your copy of tdp-spark.customSparkConfig.properties, which already contains spark.ui.reverseProxy true, or pass the parameters in each spark-submit:
spark-submit \
--conf spark.ui.reverseProxy=true \
--conf spark.ui.reverseProxyUrl=http://<SPARK_HOSTNAME> \
...
Add the blocks to the values file
Replace the class, hostname and Gateway placeholders with your cluster's values.
gatewayApi and TDP-Settings belong at the file root, alongside the spark and tdp-spark blocks.
Apply to the release
The Ingress or HTTPRoute is created in the same namespace as Spark.
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-spark \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace \
-f <VALUES_FILE>
Make the hostname reach the cluster
The hostname must resolve to the Ingress controller or Gateway.
Point the hostname in DNS or /etc/hosts to the Ingress controller's external IP. With the nginx controller, this command returns the IP:
kubectl get svc -A -l app.kubernetes.io/name=ingress-nginx \
-o jsonpath='{.items[0].status.loadBalancer.ingress[0].ip}'
With Gateway API, check the HTTPRoute created:
kubectl -n <NAMESPACE> get httproute
The OpenShift router publishes the Ingress as a Route. The URL appears with:
kubectl -n <NAMESPACE> get route
Success criteria
http://<SPARK_HOSTNAME>, and the Back to Master button on worker pages returns to this same address.S3 storage, Iceberg and Delta Lake in Hive Metastore, Jupyter and Airflow.
This tab connects Spark to S3-compatible storage, with the values file and the step-by-step procedure, and shows where the other integrations are.
Spark reads and writes data in other platform components, and other components run Spark. The chart connects Spark's side: S3-compatible storage, such as the Ozone S3 Gateway, through S3A in tdp-spark.hadoopConfig; Iceberg and Delta Lake tables registered in Hive Metastore; and a client configuration for Jupyter. Jupyter notebooks and Airflow tasks run their own drivers outside this chart's pods.
The executors connected to S3 storage
- Users. Without external exposure, each person opens a tunnel from their own machine to the master Service with kubectl port-forward. Chart default:
no external exposure (port-forward). - Master Service. The master's internal address in the cluster: the web interface on the spark.service.ports.http port, and application submission on spark.service.ports.cluster. The name is <RELEASE_NAME>-spark-master-svc, or <RELEASE_NAME>-master-svc when the release name already contains spark. Chart default:
ClusterIP. (spark.service.ports.http · spark.service.ports.cluster) - Master. Receives submitted applications and distributes their executors among workers. Chart default:
requests and limits in spark.master.resources. (spark.master.resources) - Workers. Run application executors. The count is fixed, from spark.worker.replicaCount. An executor is only scheduled on a worker with the memory and cores it requests. Chart default:
count in spark.worker.replicaCount · HPA disabled · requests and limits in spark.worker.resources. (spark.worker.replicaCount · spark.worker.resources) - Spark History Server. The chart's own History Server, disabled by default. With it disabled, event logs are also disabled. Chart default:
disabled. (spark.historyServer.enabled) - S3-compatible storage. The Ozone S3 Gateway or another S3-compatible endpoint, accessed through S3A. The endpoint and keys have no defaults. Chart default:
no endpoint or keys. (tdp-spark.hadoopConfig) - core-site.xml. Hadoop properties, such as S3A settings, generated from hadoopConfig and mounted in the master and workers. Chart default:
fs.defaultFS in the warehouse bucket, no endpoint or keys. (tdp-spark.hadoopConfig) - spark-defaults.conf. Spark properties generated from customSparkConfig.properties, plus lines the chart adds for the classpath, integrations and History Server. Chart default:
event logs disabled; executor and driver sizes. (tdp-spark.customSparkConfig.properties) - Image jars. The S3A, Iceberg and Delta Lake jars are already in the image. The chart always adds S3A jars to the driver and executor classpath, and adds Iceberg and Delta Lake jars when you enable them. Chart default:
S3A on the classpath; Iceberg and Delta Lake disabled. (tdp-spark.bundledJars)
The chart already points fs.defaultFS to the warehouse bucket through S3A, but the endpoint and the keys have no default: you provide them. The bucket must exist in the storage.
The values file for this action is in S3 storage. Build yours from it and apply it with the procedure below.
With Ozone at its defaults, without Kerberos, the S3 Gateway does not check keys: any non-empty pair works. With Ozone security enabled, only keys issued by Ozone work, such as the one in the ozone-s3-credentials Secret. The path is in Security - Spark.
Add the block to the values file
Replace the placeholders with your storage's endpoint and keys.
If you already have a Spark values file, add the block to it.
Apply to the release
The chart regenerates core-site.xml.
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-spark \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace \
-f <VALUES_FILE>
Success criteria
kubectl -n <NAMESPACE> get configmap tdp-spark-hadoop-config -o yaml
core-site.xml shows fs.s3a.endpoint with the address you provided.
If applications cannot reach S3
Check the endpoint, the keys and whether the warehouse bucket exists. See When something goes wrong.
The other integrations, with the complete files explained line by line, are in Integrations - Spark: the two files the chart generates in scenario 1, Iceberg and Delta Lake tables in Hive Metastore in scenario 3, the client configuration for Jupyter in scenario 4, and Airflow in scenario 5. Keys in a Secret, outside the values file, are in Security - Spark.
When something goes wrong
Troubleshooting
Paste the error message or choose a symptom. The answer includes the cause, what to do and the command.
- Installation rejected: license check failed. Cause: The TDP license is missing or invalid in the cluster. What to do: Check the license with the command below. If its status is not VALID, install or renew it (Licensing Configuration) and repeat installation.
- Pods in ImagePullBackOff. Cause: The tdp-registry pull Secret is missing from the release namespace: the Spark image comes from the Tecnisys registry, which requires login. What to do: Create the tdp-registry Secret in the release namespace with your registry credentials (scenario 1, First contact).
- Application keeps waiting and never receives executors. Cause: The executor requests more memory or cores than a worker offers and is never scheduled. What to do: Reduce spark.executor.memory and spark.executor.cores in your copy of customSparkConfig.properties, or increase spark.worker.resources limits (Sizing scenario).
- Driver does not start: event log directory does not exist. Cause: Event logs are enabled in a directory that does not exist. Without History Server, the chart leaves event logs disabled for this very reason. What to do: Enable History Server (History scenario), which creates the directory, or leave spark.eventLog.enabled false in your copy of customSparkConfig.properties.
- History Server does not start with event logs in S3. Cause: The spark.historyServer.eventLog.dir directory needs the S3 endpoint and keys in hadoopConfig, and the bucket must exist. What to do: Configure S3 (Integrations - Spark, S3 scenario) and create the bucket before enabling History Server.
- Master, workers and History Server stuck on a single node. Cause: With event logs on a ReadWriteOnce PVC, every pod using the volume is scheduled on the same node. What to do: Use a StorageClass with ReadWriteMany when these pods can run on different nodes.
- HPA does not scale workers. Cause: Metrics Server is missing or worker requests are not configured. What to do: Install Metrics Server and keep spark.worker.resources.requests configured.
- Interface links lead to internal addresses or return to the home page. Cause: The public address was not supplied to the Spark reverse proxy. What to do: Set spark.ui.reverseProxyUrl in the master, workers and applications (Publish at a URL scenario).
- S3A, Iceberg or Delta Lake classes not found. Cause: A custom spark.driver.extraClassPath in customSparkConfig.properties replaces the chart classpath. Or the image tag changed without updating bundledJars. What to do: Remove the custom extraClassPath and keep bundledJars in sync with spark.image.tag.
- Other problem. Cause: Start with pod status and namespace events. What to do: Events in chronological order show what prevents the pod from starting.
What remains after uninstalling
helm uninstall <RELEASE_NAME> -n <NAMESPACE>
With event logs on a PVC, the spark-history-events PVC remains in the cluster after helm uninstall. To start from scratch, delete it manually:
kubectl -n <NAMESPACE> delete pvc spark-history-events
The order for removing all components and the platform is in Uninstallation.
Lists and text in the values file
Three parts of Spark configuration are not added to the chart's: when your values file defines them, they replace the chart's entirely.
- Master and worker volume lists (
spark.master.extraVolumes,spark.master.extraVolumeMountsand the worker equivalents). The chart already fills each withhadoop-config,spark-artifactsandcustom-spark-defaults. When adding a volume, repeat these entries. The event logs PVC example in scenario 3 shows how. tdp-spark.customSparkConfig.properties, a single text string. Start with a copy of the default content and add or adjust your lines.- The driver classpath. Your own
spark.driver.extraClassPathwithinpropertiesreplaces the classpath the chart builds with jars fromtdp-spark.bundledJars.
All parameters
Filter by name or group. The chart prefix is already filled in. Keys without a prefix, such as those in the spark block, belong at the root of the values file.
The Spark image is specified in full in spark.image.repository: host, project and name in a single string. spark.image.registry is an optional prefix added before that reference to use a local mirror. When empty, as in the default, no prefix is added. To change the image, override spark.image.repository with the full reference.
43 of 43 parameters
| Parameter | Description | Chart default |
|---|---|---|
spark.enabledGeneral | Enables Spark deployment | true |
spark.image.repositoryGeneral | Spark image host, project and name in a single string | registry.tecnisys.com.br/tdp/images/spark |
spark.image.registryGeneral | Optional prefix added before image.repository for a local mirror. Empty means no prefix | "" |
spark.image.tagGeneral | Spark image tag. Update together with bundledJars | 4.0.2-3 |
spark.image.pullSecretsGeneral | Registry pull Secrets | [tdp-registry] |
spark.serviceAccount.nameGeneral | ServiceAccount of the master, workers and History Server | tdp-spark-sa |
global.compatibility.openshift.adaptSecurityContextGeneral | On OpenShift, lets the SCC assign UID and GID: auto, force or disabled | auto |
spark.service.ports.httpAccess | Web interface port in the master Service | 80 |
spark.service.ports.clusterAccess | Application submission port in the master Service | 7077 |
spark.worker.replicaCountWorkers | Worker count | 2 |
spark.worker.autoscaling.enabledWorkers | Worker HPA | false |
spark.worker.autoscaling.minReplicasWorkers | Minimum workers with HPA | 2 |
spark.worker.autoscaling.maxReplicasWorkers | Maximum workers with HPA | 10 |
spark.worker.autoscaling.targetCPUWorkers | CPU usage that triggers scaling | 70 |
spark.worker.autoscaling.targetMemoryWorkers | Memory usage that triggers scaling | 80 |
spark.master.resourcesResources | Master requests and limits | requests cpu: 1, memory: 1Gi; limits cpu: 2, memory: 2Gi |
spark.worker.resourcesResources | Each worker's requests and limits. The worker advertises the memory limit minus 1 GiB to the master (3 GiB with a 4Gi limit), and the worker process uses about 1 GiB of heap; an executor larger than that is never scheduled | requests cpu: 1, memory: 1Gi; limits cpu: 2, memory: 4Gi |
tdp-spark.hadoopConfigConfiguration | core-site.xml properties, such as fs.s3a.* | fs.defaultFS: s3a://warehouse, S3A settings, no endpoint or keys |
tdp-spark.customSparkConfig.propertiesConfiguration | spark-defaults.conf content, a single text string. Defining it replaces the entire default | event logs disabled, reverse proxy enabled, spark.executor.memory 2g, spark.driver.memory 2g |
tdp-spark.customSparkConfig.configMapNameConfiguration | ConfigMap providing spark-defaults.conf | spark-custom-defaults |
tdp-spark.bundledJarsConfiguration | Image jars added to the driver and executor classpath. Follows spark.image.tag | S3A, Iceberg and Delta Lake from the image |
spark.historyServer.enabledHistory Server | Deploys Spark History Server and enables event logs | false |
spark.historyServer.eventLog.dirHistory Server | Event log directory when not using a PVC | s3a://warehouse/spark-events |
spark.historyServer.eventLog.createDirHistory Server | Creates the event log directory in an init container | true |
spark.historyServer.eventLog.persistence.enabledHistory Server | Event logs on a PVC instead of the directory | false |
spark.historyServer.eventLog.persistence.claimNameHistory Server | Fixed event logs PVC name | spark-history-events |
spark.historyServer.eventLog.persistence.accessModesHistory Server | PVC access mode | [ReadWriteMany] |
spark.historyServer.eventLog.persistence.sizeHistory Server | PVC size | 10Gi |
spark.historyServer.eventLog.persistence.storageClassHistory Server | PVC StorageClass (empty uses the cluster default) | "" |
spark.historyServer.service.portHistory Server | History Server Service port | 18080 |
spark.historyServer.ingress.hostnameHistory Server | History Server Ingress hostname | spark-history.tdp.local |
tdp-spark.integration.jupyter.enabledIntegration | Generates Spark client configuration for Jupyter | false |
tdp-spark.iceberg.enabledIntegration | iceberg catalog in Hive Metastore, warehouse in S3 | false |
tdp-spark.deltaLake.enabledIntegration | Delta Lake catalog and SQL extension, tables in S3 | false |
TDP-Settings.gateway.ingress.enabledExposure | Renders Ingress resources | false |
TDP-Settings.gateway.gatewayApi.enabledExposure | Renders Gateway API HTTPRoutes | false |
spark.ingress.enabledExposure | Master interface Ingress | false |
gatewayApi.gateway.enabledExposure | Creates a Gateway in the release namespace | false |
gatewayApi.parentRefsExposure | Gateway to which HTTPRoutes attach | [] |
gatewayApi.spark.enabledExposure | Master interface HTTPRoute | false |
gatewayApi.spark.hostnamesExposure | Master HTTPRoute hostnames | spark.tdp.local |
gatewayApi.sparkHistory.enabledExposure | History Server HTTPRoute, when enabled | true |
gatewayApi.sparkHistory.hostnamesExposure | History Server HTTPRoute hostnames | spark-history.tdp.local |
For the complete parameter list, consult the chart's values.yaml or run helm show values for the installed version.
Next steps
Integrations
Integrations - Spark
S3 and Ozone, Iceberg and Delta Lake in Hive Metastore, Jupyter and Airflow.