Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-28360

The serviceAccountName configuration item does not take effect in client mode.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 3.1.0
    • None
    • Kubernetes, Spark Core
    • None

    Description

      From the configuration item description from the spark document: https://spark.apache.org/docs/latest/running-on-kubernetes.html

       

      “spark.kubernetes.authenticate.driver.serviceAccountName default Service account that is used when running the driver pod. The driver pod uses this service account when requesting executor pods from the API server. Note that this cannot be specified alongside a CA cert file, client key file, client cert file, and/or OAuth token. In client mode, use spark.kubernetes.authenticate.serviceAccountName instead.”

      But in client mode. “spark.kubernetes.authenticate.serviceAccountName” does not take effect in fact.

      From the analysis of source codes, spark does not get this configuration item "spark.kubernetes.authenticate.serviceAccountName".
      In Unit Tests, only cases for "spark.kubernetes.authenticate.driver.serviceAccountName".

      In kubernetes, a service account provides an identity for processes that run in a Pod. When you create a pod, if you do not specify a service account, it is automatically assigned the default service account in the same namespace.
      Add a “spec.serviceAccountName” when creating a pod , can specify a custom service account.
      So in client mode, If you run your driver inside a Kubernetes pod, the serviceaccount has already existed. If your application is not running inside a pod, no serviceaccount is needed at all.

      From my point of view, just modify the document and delete the "spark.kubernetes.authenticate.serviceAccountName" configuration item description. Because it doesn't work at the moment, it also doesn't need to work.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              zhixingheyi_tian zhixingheyi_tian
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: