[英]spark-submit on kubernetes cluster does not recognise k8s --master property
我已經成功安裝了一個 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似乎甚至沒有識別 master 的 k8s 值。 [ 包含在可能的 Spark 大師中: https://spark.apache.org/docs/latest/submitting-applications.html#master-urls ]
有任何想法嗎? 我會在這里錯過什么?
謝謝
問題是我的 CMD 識別出我之前安裝的 spark-submit 版本(2.2),即使我從 spark 安裝的 bin 目錄運行命令。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.