Я использую свечу 2.4.4. Возникли проблемы при запуске spark-submit на моей машине с Ubuntu со следующей конфигурацией и системной средой:
cpchung:small$ minikube start --kubernetes-version=1.17.0
? minikube v1.6.2 on Ubuntu 19.10
✨ Selecting 'kvm2' driver from user configuration (alternates: [virtualbox none])
? Tip: Use 'minikube start -p <name>' to create a new cluster, or 'minikube delete' to delete this one.
? Using the running kvm2 "minikube" VM ...
⌛ Waiting for the host to be provisioned ...
? Preparing Kubernetes v1.17.0 on Docker '18.09.9' ...
? Downloading kubelet v1.17.0
? Downloading kubeadm v1.17.0
? Pulling images ...
? Launching Kubernetes ...
? Done! kubectl is now configured to use "minikube"
cpchung:small$ minikube docker-env
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.39.246:2376"
export DOCKER_CERT_PATH="/home/cpchung/.minikube/certs"
# Run this command to configure your shell:
# eval $(minikube docker-env)
cpchung:small$ eval $(minikube docker-env)
cpchung:small$ ./run.sh
внутри моего run.sh
выглядит так:
spark-submit --class SimpleApp \
--master "k8s://https://192.168.39.246:8443" \
--deploy-mode cluster \
--conf spark.kubernetes.container.image=somename:latest \
--conf spark.kubernetes.image.pullPolicy=IfNotPresent \
--conf spark.executor.instances=1 \
--conf spark.kubernetes.authenticate.driver.serviceAccountName=spark \
local:///small.jar
Затем я получил это:
simpleapp-1580791262398-driver 0/1 Error 0 21s
cpchung:small$ kubectl logs simpleapp-1580791262398-driver
20/02/04 04:41:10 INFO Utils: Successfully started service 'SparkUI' on port 4040.
20/02/04 04:41:10 INFO SparkUI: Bound SparkUI to 0.0.0.0, and started at http://simpleapp-1580791262398-driver-svc.default.svc:4040
20/02/04 04:41:10 INFO SparkContext: Added JAR file:///small.jar at spark://simpleapp-1580791262398-driver-svc.default.svc:7078/jars/small.jar with timestamp 1580791270603
20/02/04 04:41:14 INFO ExecutorPodsAllocator: Going to request 1 executors from Kubernetes.
20/02/04 04:41:14 WARN WatchConnectionManager: Exec Failure: HTTP 403, Status: 403 -
java.net.ProtocolException: Expected HTTP 101 response but was '403 Forbidden'