title: Spark execution on kubernetes - driver pod fails
body: <p>I try to run simple spark code on kubernetes cluster using spark 2.3 native kubernetes deployment feature.</p>
  
  <p>I have a kubernetes cluster running. At this time, the spark code does not read or write data. It creates an RDD from list and print out the result, just to validate the ability to run kubernetes on spark. Also, copied the spark app jar in the kubernetes container image too.</p>
  
  <p>Below is the command i run. </p>
  
  <p><code>bin/spark-submit --master k8s://https://k8-master --deploy-mode cluster --name sparkapp --class com.sparrkonk8.rdd.MockWordCount --conf spark.executor.instances=5 --conf spark.kubernetes.container.image=myapp/sparkapp:1.0.0 local:///SparkApp.jar</code></p>
  
  <blockquote>
    <p>2018-03-06 10:31:28 INFO  LoggingPodStatusWatcherImpl:54 - State
    changed, new state:    pod name:
    sparkapp-6e475a6ae18d3b7a89ca2b5f6ae7aae4-driver   namespace: default
       labels: spark-app-selector ->
    spark-9649dd66e9a946d989e2136d342ef249, spark-role -> driver   pod
    uid: 6d3e98cf-2153-11e8-85af-1204f474c8d2      creation time:
    2018-03-06T15:31:23Z   service account name: default   volumes:
    default-token-vwxvr    node name: 192-168-1-1.myapp.engg.com   start
    time: 2018-03-06T15:31:23Z     container images:
    dockerhub.com/myapp/sparkapp:1.0.0     phase: Failed   status:
    [ContainerStatus(containerID=docker://3617a400e4604600d5fcc69df396facafbb2d9cd485a63bc324c1406e72f0d35,
    image=dockerhub.com/myapp/sparkapp:1.0.0,
    imageID=docker-pullable://dockerhub.com/sparkapp@sha256:f051d86384422dff3e8c8a97db823de8e62af3ea88678da4beea3f58cdb924e5,
    lastState=ContainerState(running=null, terminated=null, waiting=null,
    additionalProperties={}), name=spark-kubernetes-driver, ready=false,
    restartCount=0, state=ContainerState(running=null,
    terminated=ContainerStateTerminated(containerID=docker://3617a400e4604600d5fcc69df396facafbb2d9cd485a63bc324c1406e72f0d35,
    exitCode=1, finishedAt=Time(time=2018-03-06T15:31:24Z,
    additionalProperties={}), message=null, reason=Error, signal=null,
    startedAt=Time(time=2018-03-06T15:31:24Z, additionalProperties={}),
    additionalProperties={}), waiting=null, additionalProperties={}),
    additionalProperties={})] 2018-03-06 10:31:28 INFO 
    LoggingPodStatusWatcherImpl:54 - Container final statuses:</p>
    
    <p>Container name: spark-kubernetes-driver Container image:
    myapp/sparkapp:1.0.0 Container state: Terminated Exit code: 1</p>
  </blockquote>