Skip to content


DriverServiceFeatureStep is a KubernetesFeatureConfigStep.

Creating Instance

DriverServiceFeatureStep takes the following to be created:

DriverServiceFeatureStep is created when:

Service Name

DriverServiceFeatureStep defines Service Name based on the Preferred Service Name (if fits the name limit) or generates one:


DriverServiceFeatureStep prints out the following WARN message when generating the service name:

Driver's hostname would preferably be [preferredServiceName], but this is too long (must be <= 63 characters). Falling back to use $shorterServiceName as the driver service's name.

The service name is used for the following:

Preferred Service Name

DriverServiceFeatureStep uses the resourceNamePrefix (of the given KubernetesDriverConf) with -driver-svc postfix as the Preferred Service Name.


The preferred service name becomes the resolved service name only when shorter than 63 characters.

Additional Kubernetes Resources

getAdditionalKubernetesResources(): Seq[HasMetadata]

getAdditionalKubernetesResources is part of the KubernetesFeatureConfigStep abstraction.

getAdditionalKubernetesResources defines a Kubernetes service with the Service Name.

kubectl get services

Use k get services to list Kubernetes services.

Additional System Properties

getAdditionalPodSystemProperties(): Map[String, String]

getAdditionalPodSystemProperties is part of the KubernetesFeatureConfigStep abstraction.

getAdditionalPodSystemProperties sets the following additional Spark properties:

Name Value serviceName.namespace.svc
spark.driver.port driverPort
spark.driver.blockManager.port         driverBlockManagerPort

Configuring Driver Pod

  pod: SparkPod): SparkPod

configurePod is part of the KubernetesFeatureConfigStep abstraction.



Enable ALL logging level for org.apache.spark.deploy.k8s.features.DriverServiceFeatureStep logger to see what happens inside.

Add the following line to conf/

Refer to Logging.

Back to top