Closed antonputra closed 6 years ago
Spark Executor Command: "/usr/lib/jvm/java-8-openjdk-amd64/bin/java" "-cp" "/opt/spark/lib/gcs-connector-latest-hadoop2.jar:/opt/spark/conf/:/opt/spark/jars/*" "-Xmx512M" "-Dspark.driver.port=46063" "org.apache.spark.executor.CoarseGrainedExecutorBackend" "--driver-url" "spark://CoarseGrainedScheduler@spark-master-controller-8xlkx:46063" "--executor-id" "12" "--hostname" "192.168.4.36" "--cores" "1" "--app-id" "app-20180715012255-0001" "--worker-url" "spark://Worker@192.168.4.36:37329"
@akuksin In order to make Kubernetes and Spark 2.3.0 and up work in Standalone mode you have to do 2 thing:
spec:
ports:
clusterIP: None
Service will act as DNS Round Robin and route requests to pod rather than service(load-balancer).
spec:
hostname: spark-master
containers:
- name: spark-master
otherwise spark master will use pod's hostname as a driver-url and workers won't be able to resolve it.
Spark 2.2.2 and lower works fine on k8s(Standalone mode), but 2.3.0 and up throws "java.net.UnknownHostException"