JahstreetOrg / spark-on-kubernetes-helm

Spark on Kubernetes infrastructure Helm charts repo
Apache License 2.0
198 stars 76 forks source link

ERROR SparkKubernetesApp: Couldn't refresh Kubernetes state #83

Open pupucat opened 1 year ago

pupucat commented 1 year ago

I'm trying to run a spark app through Livy API

curl -s -k -H 'Content-Type: application/json' -X POST \
  -d '{
        "name": "SparkPi-01",
        "className": "org.apache.spark.examples.SparkPi",
        "numExecutors": 2,
        "file": "local:///opt/spark/examples/jars/spark-examples_2.12-3.0.1.jar",
        "args": ["10000"],
        "conf": {
            "spark.kubernetes.namespace": "livy"
        }
      }' "http://localhost:8998/batches"

I can see the spark-driver POD running and complete correctly. But seems the Livy Server can't get the state of application, log said:

22/12/27 03:38:29 ERROR SparkKubernetesApp: Couldn't refresh Kubernetes state
io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: GET at: https://kubernetes.default.svc.cluster.local/apis/extensions/v1beta1/namespaces/livy/ingresses?labelSelector=spark-app-tag%3Dlivy-batch-0-dcfPwsoJ. Message: 404 page not found

I tried other spark applications, all with same result, the spark app can run and complete, but Livy can't query its state.

Do I miss some configurations?

hadenpereira commented 1 year ago

Looks like the api has been deprectaed as of v1.19

The correct path for fetching the ingress should be kubernetes.default.svc.cluster.local/apis/networking.k8s.io/v1/namespaces/livy/ingresses