【发布时间】:2019-07-25 18:35:12
【问题描述】:
我已经成功安装了一个 Kubernetes 集群,可以通过以下方式进行验证:
C:\windows\system32>kubectl cluster-info
Kubernetes master is running at https://<ip>:<port>
KubeDNS is running at https://<ip>:<port>/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
然后我尝试使用从 https://spark.apache.org/downloads.html 下载的 Spark 运行 SparkPi。
spark-submit --master k8s://https://192.168.99.100:8443 --deploy-mode cluster --name spark-pi --class org.apache.spark.examples.SparkPi --conf spark.executor.instances=2 --conf spark.kubernetes.container.image=gettyimages/spark c:\users\<username>\Desktop\spark-2.4.0-bin-hadoop2.7\examples\jars\spark-examples_2.11-2.4.0.jar
我收到此错误:
Error: Master must either be yarn or start with spark, mesos, local
Run with --help for usage help or --verbose for debug output
我尝试了 2.4.0 和 2.3.3 版本。我也试过了
spark-submit --help
查看关于 --master 属性的信息。这是我得到的:
--master MASTER_URL spark://host:port, mesos://host:port, yarn, or local.
根据关于在 Kubernetes 中运行 Spark 工作负载的文档 [https://spark.apache.org/docs/latest/running-on-kubernetes.html],spark-submit 似乎甚至无法识别主节点的 k8s 值。 [包括在可能的 Spark 大师中:https://spark.apache.org/docs/latest/submitting-applications.html#master-urls]
有什么想法吗?我会在这里错过什么?
谢谢
【问题讨论】: