<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/give-spark-a-front-door-building-batch-jobs-for-kubeflow-s-sparkclient-9iyjvdpxo" -->

---
title: Give Spark a Front Door: Building Batch Jobs for...
description: A GSoC 2026 contributor describes building batch job support for Kubeflow's SparkClient SDK (KEP-107). The work introduces a Python-native API for submitting,...
canonical: https://daily.dev/posts/give-spark-a-front-door-building-batch-jobs-for-kubeflow-s-sparkclient-9iyjvdpxo
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Give Spark a Front Door: Building Batch Jobs for Kubeflow’s SparkClient | daily.dev
og:description: A GSoC 2026 contributor describes building batch job support for Kubeflow's SparkClient SDK (KEP-107). The work introduces a Python-native API for submitting,...
og:url: https://daily.dev/posts/give-spark-a-front-door-building-batch-jobs-for-kubeflow-s-sparkclient-9iyjvdpxo
og:image: https://api.daily.dev/og/posts/9iyjvDPxO.png
og:image:alt: Give Spark a Front Door: Building Batch Jobs for Kubeflow’s SparkClient
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Give Spark a Front Door: Building Batch Jobs for Kubeflow’s SparkClient

**[Medium](https://daily.dev/sources/medium_js)** · 8 min read · 3 upvotes · 0 comments

## Summary

A GSoC 2026 contributor describes building batch job support for Kubeflow's SparkClient SDK (KEP-107). The work introduces a Python-native API for submitting, monitoring, and cleaning up Spark jobs on Kubernetes without hand-authoring CRDs. Two job types are supported: FileJob (pointing at a remote or pre-mounted script) and FuncJob (serializing a Python function via an init container). After submission, a unified set of lifecycle calls — wait_for_job_status(), get_job(), list_jobs(), get_job_logs(), and delete_job() — operates identically regardless of job type. The design deliberately abstracts away the SparkApplication CRD so data scientists interact only with Python functions. Driver-only log streaming is included; executor logs and Prometheus-friendly observability metrics are planned next.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/@sameer.y2099/give-spark-a-front-door-building-batch-jobs-for-kubeflows-sparkclient-edb2e4cf4852>

## Questions this post answers

### How does Kubeflow SparkClient's submit_job handle a local file source versus a remote one like s3a or gs?

For remote sources such as s3a://, gs://, hdfs://, or https://, the SparkApplication references the URI directly and the Spark Operator fetches it at run time. For local paths like local:///opt/spark/app/etl.py, the SDK does not package or upload anything—the file must already be reachable inside the driver pod via a mounted PVC or a custom image before submission.

_Developers wiring up Spark batch pipelines on Kubernetes can track SDK design details like this through daily.dev._

### How does Kubeflow SparkClient run a Python function directly from a notebook as a Spark job without a separate script file?

A FuncJob wraps a Python function object; the SDK serializes it into a generated script, writes it to a shared emptyDir volume via an init container, and points the driver at that generated file using constants.FUNC_JOB_MAIN_FILE. From the caller's perspective it works identically to submitting a file-based job, since both become the same SparkApplication resource afterward.

_Anyone comparing SDK approaches for running Spark jobs on Kubernetes can follow this kind of workflow detail on daily.dev._

### Why doesn't get_job_logs in Kubeflow SparkClient show executor logs, only driver logs?

Executor log access isn't wired in yet; logs currently come only from the driver pod via the Kubernetes API's read_namespaced_pod_log call, with follow=True supported for streaming. This is a sequencing choice rather than an oversight, since the driver reports stage failures, exceptions, and final job status, covering the main debugging need for the first release.

_Engineers debugging Spark-on-Kubernetes jobs can keep up with SDK capability changes like this via daily.dev._

## Similar posts on daily.dev

- [Kubeflow SDK v0.4.0: Model Registry, SparkConnect, and Enhanced Developer Experience](https://daily.dev/posts/kubeflow-sdk-v0-4-0-model-registry-sparkconnect-and-enhanced-developer-experience-gmtyzchev) · Kubeflow · 13 upvotes · 0 comments
- [Kubeflow unveils new cloud native innovations to supercharge AI](https://daily.dev/posts/kubeflow-unveils-new-cloud-native-innovations-to-supercharge-ai-j6rwmavmb) · CNCF · 0 upvotes · 0 comments
- [Introducing the Kubeflow SDK: A Pythonic API to Run AI Workloads at Scale](https://daily.dev/posts/introducing-the-kubeflow-sdk-a-pythonic-api-to-run-ai-workloads-at-scale-w1ibbtflz) · Kubeflow · 3 upvotes · 0 comments
- [Task-based orchestration for containerized Jobs](https://daily.dev/posts/task-based-orchestration-for-containerized-jobs-yecrtluyh) · Snowflake Community · 0 upvotes · 0 comments
- [Announcing General Availability of Python Data Source API](https://daily.dev/posts/announcing-general-availability-of-python-data-source-api-kz7bygbgh) · databricks · 6 upvotes · 0 comments

---

Tags: [#python](https://daily.dev/tags/python), [#kubernetes](https://daily.dev/tags/kubernetes), [#apache-spark](https://daily.dev/tags/apache-spark)

[View this post on daily.dev](https://daily.dev/posts/give-spark-a-front-door-building-batch-jobs-for-kubeflow-s-sparkclient-9iyjvdpxo)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Give Spark a Front Door: Building Batch Jobs for Kubeflow’s SparkClient","url":"https://daily.dev/posts/give-spark-a-front-door-building-batch-jobs-for-kubeflow-s-sparkclient-9iyjvdpxo","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/give-spark-a-front-door-building-batch-jobs-for-kubeflow-s-sparkclient-9iyjvdpxo"},"datePublished":"2026-07-28T07:34:39.568Z","dateModified":"2026-09-14T08:42:08.343Z","description":"A GSoC 2026 contributor describes building batch job support for Kubeflow's SparkClient SDK (KEP-107). The work introduces a Python-native API for submitting,...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ed5ee53b82ec7452f16d098fbfec1e1f?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ed5ee53b82ec7452f16d098fbfec1e1f?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/give-spark-a-front-door-building-batch-jobs-for-kubeflow-s-sparkclient-9iyjvdpxo","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"python,kubernetes,apache-spark","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"Give Spark a Front Door: Building Batch Jobs for Kubeflow’s SparkClient"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/give-spark-a-front-door-building-batch-jobs-for-kubeflow-s-sparkclient-9iyjvdpxo#faq","mainEntity":[{"@type":"Question","name":"How does Kubeflow SparkClient's submit_job handle a local file source versus a remote one like s3a or gs?","acceptedAnswer":{"@type":"Answer","text":"For remote sources such as s3a://, gs://, hdfs://, or https://, the SparkApplication references the URI directly and the Spark Operator fetches it at run time. For local paths like local:///opt/spark/app/etl.py, the SDK does not package or upload anything—the file must already be reachable inside the driver pod via a mounted PVC or a custom image before submission. Developers wiring up Spark batch pipelines on Kubernetes can track SDK design details like this through daily.dev."}},{"@type":"Question","name":"How does Kubeflow SparkClient run a Python function directly from a notebook as a Spark job without a separate script file?","acceptedAnswer":{"@type":"Answer","text":"A FuncJob wraps a Python function object; the SDK serializes it into a generated script, writes it to a shared emptyDir volume via an init container, and points the driver at that generated file using constants.FUNC_JOB_MAIN_FILE. From the caller's perspective it works identically to submitting a file-based job, since both become the same SparkApplication resource afterward. Anyone comparing SDK approaches for running Spark jobs on Kubernetes can follow this kind of workflow detail on daily.dev."}},{"@type":"Question","name":"Why doesn't get_job_logs in Kubeflow SparkClient show executor logs, only driver logs?","acceptedAnswer":{"@type":"Answer","text":"Executor log access isn't wired in yet; logs currently come only from the driver pod via the Kubernetes API's read_namespaced_pod_log call, with follow=True supported for streaming. This is a sequencing choice rather than an oversight, since the driver reports stage failures, exceptions, and final job status, covering the main debugging need for the first release. Engineers debugging Spark-on-Kubernetes jobs can keep up with SDK capability changes like this via daily.dev."}}]}
```

