• Stars
    star
    2,724
  • Rank 16,608 (Top 0.4 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 6 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Kubernetes operator for managing the lifecycle of Apache Spark applications on Kubernetes.

Go Report Card

This is not an officially supported Google product.

Community

Project Status

Project status: beta

Current API version: v1beta2

If you are currently using the v1beta1 version of the APIs in your manifests, please update them to use the v1beta2 version by changing apiVersion: "sparkoperator.k8s.io/<version>" to apiVersion: "sparkoperator.k8s.io/v1beta2". You will also need to delete the previous version of the CustomResourceDefinitions named sparkapplications.sparkoperator.k8s.io and scheduledsparkapplications.sparkoperator.k8s.io, and replace them with the v1beta2 version either by installing the latest version of the operator or by running kubectl create -f manifest/crds.

Customization of Spark pods, e.g., mounting arbitrary volumes and setting pod affinity, is implemented using a Kubernetes Mutating Admission Webhook, which became beta in Kubernetes 1.9. The mutating admission webhook is disabled by default if you install the operator using the Helm chart. Check out the Quick Start Guide on how to enable the webhook.

Prerequisites

  • Version >= 1.13 of Kubernetes to use the subresource support for CustomResourceDefinitions, which became beta in 1.13 and is enabled by default in 1.13 and higher.

  • Version >= 1.16 of Kubernetes to use the MutatingWebhook and ValidatingWebhook of apiVersion: admissionregistration.k8s.io/v1.

Installation

The easiest way to install the Kubernetes Operator for Apache Spark is to use the Helm chart.

$ helm repo add spark-operator https://googlecloudplatform.github.io/spark-on-k8s-operator

$ helm install my-release spark-operator/spark-operator --namespace spark-operator --create-namespace

This will install the Kubernetes Operator for Apache Spark into the namespace spark-operator. The operator by default watches and handles SparkApplications in every namespaces. If you would like to limit the operator to watch and handle SparkApplications in a single namespace, e.g., default instead, add the following option to the helm install command:

--set sparkJobNamespace=default

For configuration options available in the Helm chart, please refer to the chart's README.

Version Matrix

The following table lists the most recent few versions of the operator.

Operator Version API Version Kubernetes Version Base Spark Version Operator Image Tag
latest (master HEAD) v1beta2 1.13+ 3.0.0 latest
v1beta2-1.3.3-3.1.1 v1beta2 1.16+ 3.1.1 v1beta2-1.3.3-3.1.1
v1beta2-1.3.2-3.1.1 v1beta2 1.16+ 3.1.1 v1beta2-1.3.2-3.1.1
v1beta2-1.3.0-3.1.1 v1beta2 1.16+ 3.1.1 v1beta2-1.3.0-3.1.1
v1beta2-1.2.3-3.1.1 v1beta2 1.13+ 3.1.1 v1beta2-1.2.3-3.1.1
v1beta2-1.2.0-3.0.0 v1beta2 1.13+ 3.0.0 v1beta2-1.2.0-3.0.0
v1beta2-1.1.2-2.4.5 v1beta2 1.13+ 2.4.5 v1beta2-1.1.2-2.4.5
v1beta2-1.0.1-2.4.4 v1beta2 1.13+ 2.4.4 v1beta2-1.0.1-2.4.4
v1beta2-1.0.0-2.4.4 v1beta2 1.13+ 2.4.4 v1beta2-1.0.0-2.4.4
v1beta1-0.9.0 v1beta1 1.13+ 2.4.0 v2.4.0-v1beta1-0.9.0

When installing using the Helm chart, you can choose to use a specific image tag instead of the default one, using the following option:

--set image.tag=<operator image tag>

Get Started

Get started quickly with the Kubernetes Operator for Apache Spark using the Quick Start Guide.

If you are running the Kubernetes Operator for Apache Spark on Google Kubernetes Engine and want to use Google Cloud Storage (GCS) and/or BigQuery for reading/writing data, also refer to the GCP guide.

For more information, check the Design, API Specification and detailed User Guide.

Overview

The Kubernetes Operator for Apache Spark aims to make specifying and running Spark applications as easy and idiomatic as running other workloads on Kubernetes. It uses Kubernetes custom resources for specifying, running, and surfacing status of Spark applications. For a complete reference of the custom resource definitions, please refer to the API Definition. For details on its design, please refer to the design doc. It requires Spark 2.3 and above that supports Kubernetes as a native scheduler backend.

The Kubernetes Operator for Apache Spark currently supports the following list of features:

  • Supports Spark 2.3 and up.
  • Enables declarative application specification and management of applications through custom resources.
  • Automatically runs spark-submit on behalf of users for each SparkApplication eligible for submission.
  • Provides native cron support for running scheduled applications.
  • Supports customization of Spark pods beyond what Spark natively is able to do through the mutating admission webhook, e.g., mounting ConfigMaps and volumes, and setting pod affinity/anti-affinity.
  • Supports automatic application re-submission for updated SparkApplication objects with updated specification.
  • Supports automatic application restart with a configurable restart policy.
  • Supports automatic retries of failed submissions with optional linear back-off.
  • Supports mounting local Hadoop configuration as a Kubernetes ConfigMap automatically via sparkctl.
  • Supports automatically staging local application dependencies to Google Cloud Storage (GCS) via sparkctl.
  • Supports collecting and exporting application-level metrics and driver/executor metrics to Prometheus.

Contributing

Please check CONTRIBUTING.md and the Developer Guide out.

More Repositories

1

kubeflow

Machine Learning Toolkit for Kubernetes
TypeScript
13,574
star
2

pipelines

Machine Learning Pipelines for Kubeflow
Python
3,550
star
3

training-operator

Distributed ML Training and Fine-Tuning on Kubernetes
Go
1,561
star
4

katib

Repository for hyperparameter tuning
Go
1,415
star
5

examples

A repository to host extended examples and tutorials
Jsonnet
1,386
star
6

manifests

A repository for Kustomize manifests
YAML
735
star
7

arena

A CLI for Kubeflow.
Go
730
star
8

mpi-operator

Kubernetes Operator for MPI-based applications (distributed training, HPC, etc.)
Go
392
star
9

fairing

Python SDK for building, training, and deploying ML models
Jsonnet
335
star
10

pytorch-operator

PyTorch on Kubernetes
Jsonnet
301
star
11

kfctl

kfctl is a CLI for deploying and managing Kubeflow
Go
177
star
12

example-seldon

Example for end-to-end machine learning on Kubernetes using Kubeflow and Seldon Core
Jupyter Notebook
172
star
13

kfp-tekton

Kubeflow Pipelines on Tekton
TypeScript
171
star
14

community

Information about the Kubeflow community including proposals and governance information.
Jsonnet
153
star
15

website

Kubeflow's public website
HTML
146
star
16

metadata

Repository for assets related to Metadata.
TypeScript
120
star
17

xgboost-operator

Incubating project for xgboost operator
Python
76
star
18

kubebench

Repository for benchmarking
Jsonnet
75
star
19

testing

Test infrastructure and tooling for Kubeflow.
Python
63
star
20

code-intelligence

ML-Powered Developer Tools, using Kubeflow
Jupyter Notebook
56
star
21

mxnet-operator

A Kubernetes operator for mxnet jobs
Go
53
star
22

common

Common APIs and libraries shared by other Kubeflow operator repositories.
Go
51
star
23

fate-operator

Fate operator
Go
50
star
24

model-registry

Go
32
star
25

batch-predict

Repository for batch predict
Python
17
star
26

chainer-operator

Repository for chainer operator
Jsonnet
17
star
27

blog

Kubeflow blog based on fastpages
Jupyter Notebook
16
star
28

caffe2-operator

Experimental repository for a caffe2 operator
Go
16
star
29

internal-acls

Repository used to main group ACLs used by Kubeflow developers
Go
14
star
30

crd-validation

Validation Generation for Kubeflow CRD on Kubernetes
Go
11
star
31

kfserving-lts

Jsonnet
10
star
32

frontend

Repository for kubeflow frontend
JavaScript
8
star
33

kfp-tekton-backend

Experimental project plugging Tekton yaml behind KFP API and UI engine
TypeScript
8
star
34

marketing-materials

4
star
35

community-infra

Declarative configurations for KF community infrastructure
Go
3
star
36

fastpages

fastpages is a platform for blogging
Jupyter Notebook
3
star
37

.allstar

2
star
38

reporting

Repository for collecting and analyzing metrics about Kubeflow usage.
Jsonnet
2
star
39

.github

Org wide templates
2
star
40

triage-issues

For triaging issues in kubeflow
1
star
41

dashboard

1
star