spark

by [riftbit]

Helm chartv5.7.3App 3.1.2Verified publisher

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

NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]

Common parameters

NameDescriptionValue
kubeVersionForce target Kubernetes version (using Helm capabilities if not set)""
nameOverrideString to partially override common.names.fullname template (will maintain the release name)""
fullnameOverrideString to fully override common.names.fullname template""
extraDeployArray of extra objects to deploy with the release[]
diagnosticMode.enabledEnable diagnostic mode (all probes will be disabled and the command will be overridden)false
diagnosticMode.commandCommand to override all containers in the deployment["sleep"]
diagnosticMode.argsArgs to override all containers in the deployment["infinity"]

Spark parameters

NameDescriptionValue
image.registrySpark image registrydocker.io
image.repositorySpark image repositorybitnami/spark
image.tagSpark image tag (immutable tags are recommended)3.1.2-debian-10-r99
image.pullPolicySpark image pull policyIfNotPresent
image.pullSecretsSpecify docker-registry secret names as an array[]
image.debugEnable image debug modefalse
hostNetworkEnable HOST Networkfalse

Spark master parameters

NameDescriptionValue
master.configurationConfigMapSet a custom configuration by using an existing configMap with the configuration file.""
master.webPortSpecify the port where the web interface will listen on the master8080
master.clusterPortSpecify the port where the master listens to communicate with workers7077
master.hostAliasesDeployment pod host aliases[]
master.daemonMemoryLimitSet the memory limit for the master daemon""
master.configOptionsUse a string to set the config options for in the form "-Dx=y"""
master.extraEnvVarsExtra environment variables to pass to the master container[]
master.securityContext.enabledEnable security contexttrue
master.securityContext.fsGroupGroup ID for the container1001
master.securityContext.runAsUserUser ID for the container1001
master.securityContext.runAsGroupGroup ID for the container0
master.securityContext.seLinuxOptionsSELinux options for the container{}
master.podAnnotationsAnnotations for pods in StatefulSet{}
master.extraPodLabelsExtra labels for pods in StatefulSet{}
master.podAffinityPresetSpark master pod affinity preset. Ignored if master.affinity is set. Allowed values: soft or hard""
master.podAntiAffinityPresetSpark master pod anti-affinity preset. Ignored if master.affinity is set. Allowed values: soft or hardsoft
master.nodeAffinityPreset.typeSpark master node affinity preset type. Ignored if master.affinity is set. Allowed values: soft or hard""
master.nodeAffinityPreset.keySpark master node label key to match Ignored if master.affinity is set.""
master.nodeAffinityPreset.valuesSpark master node label values to match. Ignored if master.affinity is set.[]
master.affinitySpark master affinity for pod assignment{}
master.nodeSelectorSpark master node labels for pod assignment{}
master.tolerationsSpark master tolerations for pod assignment[]
master.resources.limitsThe resources limits for the container{}
master.resources.requestsThe requested resources for the container{}
master.livenessProbe.enabledEnable livenessProbetrue
master.livenessProbe.initialDelaySecondsInitial delay seconds for livenessProbe180
master.livenessProbe.periodSecondsPeriod seconds for livenessProbe20
master.livenessProbe.timeoutSecondsTimeout seconds for livenessProbe5
master.livenessProbe.failureThresholdFailure threshold for livenessProbe6
master.livenessProbe.successThresholdSuccess threshold for livenessProbe1
master.readinessProbe.enabledEnable readinessProbetrue
master.readinessProbe.initialDelaySecondsInitial delay seconds for readinessProbe30
master.readinessProbe.periodSecondsPeriod seconds for readinessProbe10
master.readinessProbe.timeoutSecondsTimeout seconds for readinessProbe5
master.readinessProbe.failureThresholdFailure threshold for readinessProbe6
master.readinessProbe.successThresholdSuccess threshold for readinessProbe1
master.initContainersAdd initContainers to the master pods.[]

Spark worker parameters

NameDescriptionValue
worker.configurationConfigMapSet a custom configuration by using an existing configMap with the configuration file.""
worker.webPortSpecify the port where the web interface will listen on the worker8081
worker.clusterPortSpecify the port where the worker listens to communicate with the master""
worker.hostAliasesAdd deployment host aliases[]
worker.extraPortsSpecify the port where the running jobs inside the workers listens[]
worker.daemonMemoryLimitSet the memory limit for the worker daemon""
worker.memoryLimitSet the maximum memory the worker is allowed to use""
worker.coreLimitSe the maximum number of cores that the worker can use""
worker.dirSet a custom working directory for the application""
worker.javaOptionsSet options for the JVM in the form -Dx=y""
worker.configOptionsSet extra options to configure the worker in the form -Dx=y""
worker.extraEnvVarsAn array to add extra env vars[]
worker.replicaCountNumber of spark workers (will be the minimum number when autoscaling is enabled)2
worker.podManagementPolicyStatefulset Pod Management Policy TypeOrderedReady
worker.securityContext.enabledEnable security contexttrue
worker.securityContext.fsGroupGr

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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartspark is pinned at v5.7.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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