Code Monkey home page Code Monkey logo

Comments (4)

bbenzikry avatar bbenzikry commented on June 3, 2024

Hi @batCoder95, can you share the permissions you set for the bucket?

from spark-eks.

batCoder95 avatar batCoder95 commented on June 3, 2024

Hi @bbenzikry,

The IAM Role that is associated with the IRSA service account has the AWS Managed Policy "AmazonS3FullAccess" attached to it. I am attaching the screenshot of same for reference. This is the same role, service-account and bucket I am using in normal spark jobs running on same EKS and they are working perfectly fine.

Please let me know if I should share more details.
IAM-Role-S3-Policy

from spark-eks.

batCoder95 avatar batCoder95 commented on June 3, 2024

Hey @bbenzikry ,

It worked by including the SPARK_HISTORY_OPTS parameter in the helm installation command. Turns out we need to set the spark configuration spark.hadoop.fs.s3a.aws.credentials.provider=com.amazonaws.auth.WebIdentityTokenCredentialsProvider so that the IRSA permissions are used in the pod. Below is the final helm install command that I used to make it work:

helm install spark-history-server --set rbac.create=false,serviceAccount.create=false,serviceAccount.name=svc-spark-iam,image.repository=bbenzikry/spark-eks,image.tag=spark3-latest,environment.SPARK_HISTORY_OPTS='-Dspark.hadoop.fs.s3a.aws.credentials.provider=com.amazonaws.auth.WebIdentityTokenCredentialsProvider',pvc.enablePVC=false,nfs.enableExampleNFS=false,service.type=ClusterIP,s3.enableS3=true,s3.logDirectory=s3a://spark-bucket/events/ stable/spark-history-server --namespace dev

Closing this issue. Cheers :)

from spark-eks.

bbenzikry avatar bbenzikry commented on June 3, 2024

Hmm, thanks for letting me know - in the forked chart we use it's specified as follows, it may have been changed.

if [ "$enableIAM" == "false" ]; then
              export SPARK_HISTORY_OPTS="$SPARK_HISTORY_OPTS \
              -Dspark.hadoop.fs.s3a.access.key=$(cat /etc/secrets/${accessKeyName}) \
              -Dspark.hadoop.fs.s3a.secret.key=$(cat /etc/secrets/${secretKeyName})";
            else
              export SPARK_HISTORY_OPTS="$SPARK_HISTORY_OPTS \
              -Dspark.hadoop.fs.s3a.aws.credentials.provider=com.amazonaws.auth.WebIdentityTokenCredentialsProvider";
            fi;

from spark-eks.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.