Skip to content

Commit 9cd4be6

Browse files
Yikundongjoon-hyun
authored andcommitted
[SPARK-38561][K8S][DOCS][3.3] Add doc for Customized Kubernetes Schedulers
### What changes were proposed in this pull request? This is PR to doc for basic framework capability for Customized Kubernetes Schedulers. ### Why are the changes needed? Guide user how to use spark on kubernetes custom scheduler ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? CI passed Closes #35955 from Yikun/SPARK-38561-3.3. Authored-by: Yikun Jiang <yikunkero@gmail.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
1 parent 7b3f7fd commit 9cd4be6

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docs/running-on-kubernetes.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1713,6 +1713,25 @@ spec:
17131713
image: will-be-overwritten
17141714
```
17151715

1716+
#### Customized Kubernetes Schedulers for Spark on Kubernetes
1717+
1718+
Spark allows users to specify a custom Kubernetes schedulers.
1719+
1720+
1. Specify a scheduler name.
1721+
1722+
Users can specify custom scheduler using <code>spark.kubernetes.scheduler.name</code> or
1723+
<code>spark.kubernetes.{driver/executor}.scheduler.name</code> configuration.
1724+
1725+
2. Specify scheduler related configurations.
1726+
1727+
To configure the custom scheduler the user can use [Pod templates](#pod-template), add labels (<code>spark.kubernetes.{driver,executor}.label.*</code>), annotations (<code>spark.kubernetes.{driver/executor}.annotation.*</code>) or scheduler specific configurations (such as <code>spark.kubernetes.scheduler.volcano.podGroupTemplateFile</code>).
1728+
1729+
3. Specify scheduler feature step.
1730+
1731+
Users may also consider to use <code>spark.kubernetes.{driver/executor}.pod.featureSteps</code> to support more complex requirements, including but not limited to:
1732+
- Create additional Kubernetes custom resources for driver/executor scheduling.
1733+
- Set scheduler hints according to configuration or existing Pod info dynamically.
1734+
17161735
### Stage Level Scheduling Overview
17171736

17181737
Stage level scheduling is supported on Kubernetes when dynamic allocation is enabled. This also requires <code>spark.dynamicAllocation.shuffleTracking.enabled</code> to be enabled since Kubernetes doesn't support an external shuffle service at this time. The order in which containers for different profiles is requested from Kubernetes is not guaranteed. Note that since dynamic allocation on Kubernetes requires the shuffle tracking feature, this means that executors from previous stages that used a different ResourceProfile may not idle timeout due to having shuffle data on them. This could result in using more cluster resources and in the worst case if there are no remaining resources on the Kubernetes cluster then Spark could potentially hang. You may consider looking at config <code>spark.dynamicAllocation.shuffleTracking.timeout</code> to set a timeout, but that could result in data having to be recomputed if the shuffle data is really needed.

0 commit comments

Comments
 (0)