Yes, it’s possible and basically what you did is all that is needed to complete the tasks performed on the YARN cluster in client deployment mode (where the driver runs on the computer on which the application is running).
spark-submit SparkConf, , , URL-. , Spark Spark- - YARN, Mesos, Spark Standalone local - .