spark
by [riftbit]
Spark is a fast and general-purpose cluster computing system.
About this chart
Apache Spark
Apache Spark is a high-performance engine for large-scale computing tasks, such as data processing, machine learning and real-time data streaming. It includes APIs for Java, Python, Scala and R.
TL;DR
$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/spark
Introduction
This chart bootstraps an Apache Spark deployment on a Kubernetes cluster using the Helm package manager.
Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters. This Helm chart has been tested on top of Bitnami Kubernetes Production Runtime (BKPR). Deploy BKPR to get automated TLS certificates, logging and monitoring for your applications.
Prerequisites
- Kubernetes 1.12+
- Helm 3.1.0
Installing the Chart
To install the chart with the release name my-release:
$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/spark
These commands deploy Apache Spark on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.
Tip: List all releases using
helm list
Uninstalling the Chart
To uninstall/delete the my-release statefulset:
$ helm delete my-release
The command removes all the Kubernetes components associated with the chart and deletes the release. Use the option --purge to delete all persistent volumes too.
Parameters
Global parameters
| Name | Description | Value |
|---|---|---|
global.imageRegistry | Global Docker image registry | "" |
global.imagePullSecrets | Global Docker registry secret names as an array | [] |
Common parameters
| Name | Description | Value |
|---|---|---|
kubeVersion | Force target Kubernetes version (using Helm capabilities if not set) | "" |
nameOverride | String to partially override common.names.fullname template (will maintain the release name) | "" |
fullnameOverride | String to fully override common.names.fullname template | "" |
extraDeploy | Array of extra objects to deploy with the release | [] |
diagnosticMode.enabled | Enable diagnostic mode (all probes will be disabled and the command will be overridden) | false |
diagnosticMode.command | Command to override all containers in the deployment | ["sleep"] |
diagnosticMode.args | Args to override all containers in the deployment | ["infinity"] |
Spark parameters
| Name | Description | Value |
|---|---|---|
image.registry | Spark image registry | docker.io |
image.repository | Spark image repository | bitnami/spark |
image.tag | Spark image tag (immutable tags are recommended) | 3.1.2-debian-10-r99 |
image.pullPolicy | Spark image pull policy | IfNotPresent |
image.pullSecrets | Specify docker-registry secret names as an array | [] |
image.debug | Enable image debug mode | false |
hostNetwork | Enable HOST Network | false |
Spark master parameters
| Name | Description | Value |
|---|---|---|
master.configurationConfigMap | Set a custom configuration by using an existing configMap with the configuration file. | "" |
master.webPort | Specify the port where the web interface will listen on the master | 8080 |
master.clusterPort | Specify the port where the master listens to communicate with workers | 7077 |
master.hostAliases | Deployment pod host aliases | [] |
master.daemonMemoryLimit | Set the memory limit for the master daemon | "" |
master.configOptions | Use a string to set the config options for in the form "-Dx=y" | "" |
master.extraEnvVars | Extra environment variables to pass to the master container | [] |
master.securityContext.enabled | Enable security context | true |
master.securityContext.fsGroup | Group ID for the container | 1001 |
master.securityContext.runAsUser | User ID for the container | 1001 |
master.securityContext.runAsGroup | Group ID for the container | 0 |
master.securityContext.seLinuxOptions | SELinux options for the container | {} |
master.podAnnotations | Annotations for pods in StatefulSet | {} |
master.extraPodLabels | Extra labels for pods in StatefulSet | {} |
master.podAffinityPreset | Spark master pod affinity preset. Ignored if master.affinity is set. Allowed values: soft or hard | "" |
master.podAntiAffinityPreset | Spark master pod anti-affinity preset. Ignored if master.affinity is set. Allowed values: soft or hard | soft |
master.nodeAffinityPreset.type | Spark master node affinity preset type. Ignored if master.affinity is set. Allowed values: soft or hard | "" |
master.nodeAffinityPreset.key | Spark master node label key to match Ignored if master.affinity is set. | "" |
master.nodeAffinityPreset.values | Spark master node label values to match. Ignored if master.affinity is set. | [] |
master.affinity | Spark master affinity for pod assignment | {} |
master.nodeSelector | Spark master node labels for pod assignment | {} |
master.tolerations | Spark master tolerations for pod assignment | [] |
master.resources.limits | The resources limits for the container | {} |
master.resources.requests | The requested resources for the container | {} |
master.livenessProbe.enabled | Enable livenessProbe | true |
master.livenessProbe.initialDelaySeconds | Initial delay seconds for livenessProbe | 180 |
master.livenessProbe.periodSeconds | Period seconds for livenessProbe | 20 |
master.livenessProbe.timeoutSeconds | Timeout seconds for livenessProbe | 5 |
master.livenessProbe.failureThreshold | Failure threshold for livenessProbe | 6 |
master.livenessProbe.successThreshold | Success threshold for livenessProbe | 1 |
master.readinessProbe.enabled | Enable readinessProbe | true |
master.readinessProbe.initialDelaySeconds | Initial delay seconds for readinessProbe | 30 |
master.readinessProbe.periodSeconds | Period seconds for readinessProbe | 10 |
master.readinessProbe.timeoutSeconds | Timeout seconds for readinessProbe | 5 |
master.readinessProbe.failureThreshold | Failure threshold for readinessProbe | 6 |
master.readinessProbe.successThreshold | Success threshold for readinessProbe | 1 |
master.initContainers | Add initContainers to the master pods. | [] |
Spark worker parameters
| Name | Description | Value |
|---|---|---|
worker.configurationConfigMap | Set a custom configuration by using an existing configMap with the configuration file. | "" |
worker.webPort | Specify the port where the web interface will listen on the worker | 8081 |
worker.clusterPort | Specify the port where the worker listens to communicate with the master | "" |
worker.hostAliases | Add deployment host aliases | [] |
worker.extraPorts | Specify the port where the running jobs inside the workers listens | [] |
worker.daemonMemoryLimit | Set the memory limit for the worker daemon | "" |
worker.memoryLimit | Set the maximum memory the worker is allowed to use | "" |
worker.coreLimit | Se the maximum number of cores that the worker can use | "" |
worker.dir | Set a custom working directory for the application | "" |
worker.javaOptions | Set options for the JVM in the form -Dx=y | "" |
worker.configOptions | Set extra options to configure the worker in the form -Dx=y | "" |
worker.extraEnvVars | An array to add extra env vars | [] |
worker.replicaCount | Number of spark workers (will be the minimum number when autoscaling is enabled) | 2 |
worker.podManagementPolicy | Statefulset Pod Management Policy Type | OrderedReady |
worker.securityContext.enabled | Enable security context | true |
worker.securityContext.fsGroup | Gr |
Deploy spark with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has spark on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartspark is pinned at v5.7.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply