Skip to content

Commit dac099d

Browse files
liyinan926srowen
authored andcommitted
[SPARK-24090][K8S] Update running-on-kubernetes.md
## What changes were proposed in this pull request? Updated documentation for Spark on Kubernetes for the upcoming 2.4.0. Please review http://spark.apache.org/contributing.html before opening a pull request. mccheah erikerlandson Closes apache#22224 from liyinan926/master. Authored-by: Yinan Li <[email protected]> Signed-off-by: Sean Owen <[email protected]>
1 parent c3f285c commit dac099d

File tree

1 file changed

+32
-8
lines changed

1 file changed

+32
-8
lines changed

docs/running-on-kubernetes.md

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,36 @@ To use a secret through an environment variable use the following options to the
185185
--conf spark.kubernetes.executor.secretKeyRef.ENV_NAME=name:key
186186
```
187187

188+
## Using Kubernetes Volumes
189+
190+
Starting with Spark 2.4.0, users can mount the following types of Kubernetes [volumes](https://kubernetes.io/docs/concepts/storage/volumes/) into the driver and executor pods:
191+
* [hostPath](https://kubernetes.io/docs/concepts/storage/volumes/#hostpath): mounts a file or directory from the host node’s filesystem into a pod.
192+
* [emptyDir](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir): an initially empty volume created when a pod is assigned to a node.
193+
* [persistentVolumeClaim](https://kubernetes.io/docs/concepts/storage/volumes/#persistentvolumeclaim): used to mount a `PersistentVolume` into a pod.
194+
195+
To mount a volume of any of the types above into the driver pod, use the following configuration property:
196+
197+
```
198+
--conf spark.kubernetes.driver.volumes.[VolumeType].[VolumeName].mount.path=<mount path>
199+
--conf spark.kubernetes.driver.volumes.[VolumeType].[VolumeName].mount.readOnly=<true|false>
200+
```
201+
202+
Specifically, `VolumeType` can be one of the following values: `hostPath`, `emptyDir`, and `persistentVolumeClaim`. `VolumeName` is the name you want to use for the volume under the `volumes` field in the pod specification.
203+
204+
Each supported type of volumes may have some specific configuration options, which can be specified using configuration properties of the following form:
205+
206+
```
207+
spark.kubernetes.driver.volumes.[VolumeType].[VolumeName].options.[OptionName]=<value>
208+
```
209+
210+
For example, the claim name of a `persistentVolumeClaim` with volume name `checkpointpvc` can be specified using the following property:
211+
212+
```
213+
spark.kubernetes.driver.volumes.persistentVolumeClaim.checkpointpvc.options.claimName=check-point-pvc-claim
214+
```
215+
216+
The configuration properties for mounting volumes into the executor pods use prefix `spark.kubernetes.executor.` instead of `spark.kubernetes.driver.`. For a complete list of available options for each supported type of volumes, please refer to the [Spark Properties](#spark-properties) section below.
217+
188218
## Introspection and Debugging
189219

190220
These are the different ways in which you can investigate a running/completed Spark application, monitor progress, and
@@ -299,21 +329,15 @@ RBAC authorization and how to configure Kubernetes service accounts for pods, pl
299329

300330
## Future Work
301331

302-
There are several Spark on Kubernetes features that are currently being incubated in a fork -
303-
[apache-spark-on-k8s/spark](https://github.com/apache-spark-on-k8s/spark), which are expected to eventually make it into
304-
future versions of the spark-kubernetes integration.
332+
There are several Spark on Kubernetes features that are currently being worked on or planned to be worked on. Those features are expected to eventually make it into future versions of the spark-kubernetes integration.
305333

306334
Some of these include:
307335

308-
* R
309-
* Dynamic Executor Scaling
336+
* Dynamic Resource Allocation and External Shuffle Service
310337
* Local File Dependency Management
311338
* Spark Application Management
312339
* Job Queues and Resource Management
313340

314-
You can refer to the [documentation](https://apache-spark-on-k8s.github.io/userdocs/) if you want to try these features
315-
and provide feedback to the development team.
316-
317341
# Configuration
318342

319343
See the [configuration page](configuration.html) for information on Spark configurations. The following configurations are

0 commit comments

Comments
 (0)