Skip to content

[SPARK-52505][K8S] Allow to create executor kubernetes service #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

EnricoMi
Copy link

@EnricoMi EnricoMi commented Jun 13, 2025

What changes were proposed in this pull request?

This allows executors to register its block manager with the driver via a Kubernetes service name rather than the pod IP. This allows driver and executor to connect to the executor block manager via the service.

Why are the changes needed?

In Kubernetes, connecting to an evicted (decommissioned) executor times out after 2 minutes (default). Executors connect to other executors synchronously (one at a time), so this time out accumulates for each executor peer. An executor that reads from many decommissioned executors blocks for a multiple of the timeout until it fails with a fetch failure.

This can be fixed by binding the block manager to a fixed port, defining a Kubernetes service for that block manager port and have the executor register that K8S service port with the driver. The driver and other executors then connect to the service name and instantly fail with a connection refused if the executor got decommissioned and the service removed.

Setting spark.kubernetes.executor.enableService=true and defining spark.blockManager.port will perform this setup for each executor.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Unit tests.

Was this patch authored or co-authored using generative AI tooling?

No.

@EnricoMi EnricoMi force-pushed the k8s-executor-service branch 2 times, most recently from 1c9ee3e to 0673d0d Compare June 17, 2025 04:53
@EnricoMi EnricoMi force-pushed the k8s-executor-service branch from 0673d0d to c4818e3 Compare June 17, 2025 08:02
@EnricoMi EnricoMi changed the title Add executor feature step to create executor kubernetes service [SPARK-52505][K8S] Allow to create executor kubernetes service Jun 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant