Skip to content


DriverCommandFeatureStep is a KubernetesFeatureConfigStep.

Creating Instance

DriverCommandFeatureStep takes the following to be created:

DriverCommandFeatureStep is created when:

Configuring Pod

  pod: SparkPod): SparkPod

configurePod is part of the KubernetesFeatureConfigStep abstraction.

configurePod branches off based on the MainAppResource (of the KubernetesDriverConf):

Configuring Pod for Java Application

  pod: SparkPod,
  res: String): SparkPod

configureForJava builds the base driver container for the given SparkPod and the primary resource.

In the end, configureForJava creates another SparkPod (for the pod of the given SparkPod) and the driver container.

Configuring Pod for Python Application

  pod: SparkPod,
  res: String): SparkPod


Configuring Pod for R Application

  pod: SparkPod,
  res: String): SparkPod


Base Driver ContainerBuilder

  pod: SparkPod,
  resource: String): ContainerBuilder

baseDriverContainer renames the given primary resource if the MainAppResource is a JavaMainAppResource. Otherwise, baseDriverContainer leaves the primary resource as-is.

baseDriverContainer creates a ContainerBuilder (for the pod of the given SparkPod) and adds the following arguments (in that order):

  1. driver
  2. --properties-file with /opt/spark/conf/
  3. --class with the mainClass of the KubernetesDriverConf
  4. the primary resource (possibly renamed if a MainAppResource)
  5. appArgs of the KubernetesDriverConf


The arguments are then used by the default of the official Docker image of Apache Spark (in resource-managers/kubernetes/docker/src/main/dockerfiles/spark/).

Use the following kubectl command to see the arguments:

kubectl get po [driverPod] -o=jsonpath='{.spec.containers[0].args}'
Back to top