Rest API for Spark2.3 submit on kubernetes(version 1.8.*) cluster Rest API for Spark2.3 submit on kubernetes(version 1.8.*) cluster kubernetes kubernetes

Rest API for Spark2.3 submit on kubernetes(version 1.8.*) cluster


Unfortunately, it is not possible for Spark 2.3, in case you are using native Kubernetes support.

Based on description from deployment instruction, submission process contains several steps:

  • Spark creates a Spark driver running within a Kubernetes pod.
  • The driver creates executors which are also running within Kubernetes pods

  • The driver connects to them, and executes application code

When the application completes, executor pods terminate and are cleaned up, but the driver pod persists its logs and remains in “completed” state in the Kubernetes API until it’s eventually garbage collected or manually cleaned up.

So, in fact, you have no place to submit a job until you start a submission process, which will launch the first Spark's pod (driver) for you. Only once application completes, everything is terminated.

Please also see similar answer for this question under the link