The following are the steps to connect Spark with Apache Mesos:
Initially, configure the program of Spark driver to connect Mesos.
The binary package of Spark should be in a position to accessible by Mesos.
Then finally, in the location of Mesos, we have to install the Spark and configure the property by pointing to the location.