Custom spark images for working with the spark-on-k8s operator on AWS with IRSA and Glue support
10K+
Examples and custom spark images for working with the spark-on-k8s operator on AWS.
Allows using Spark 2 with IRSA and Spark 3 with IRSA and AWS Glue as a metastore
Note: Spark 2 images will not be updated, please see the FAQ
bbenzikry/spark-eks-operator:latestSuggested values for the helm chart can be found in the flux example.
Note: Do not create the spark service account automatically as part of chart use.
# NOTE: Only required when not building spark from source or using a version of spark < 3.1. If you use our *-edge docker images for spark3/pyspark3 you can skip this step, as it will rely on the driver pod.
apiVersion: v1
kind: ServiceAccount
metadata:
name: default
namespace: SPARK_JOB_NAMESPACE
annotations:
# can also be the driver role
eks.amazonaws.com/role-arn: "arn:aws:iam::ACCOUNT_ID:role/executor-role"
## With the spark3 source builds, when this is configured and no executor role exists, executors default to this SA as well.
# This is not recommended for production until a stable release is provided.
apiVersion: v1
kind: ServiceAccount
metadata:
name: spark
namespace: SPARK_JOB_NAMESPACE
annotations:
eks.amazonaws.com/role-arn: "arn:aws:iam::ACCOUNT_ID:role/executor-role"
For spark < 3.0.0, see spark2.Dockerfile and pyspark.Dockerfile
For spark 3.0.0+, see spark3.Dockerfile spark3.edge.Dockerfile
For pyspark, see pyspark.Dockerfile
Below are examples for latest versions.
If you want to use pinned versions, all images are tagged by the commit SHA.
You can find a full list of tags here
# spark2
FROM bbenzikry/spark-eks:spark2-latest
# spark3
FROM bbenzikry/spark-eks:spark3-latest
# source / master build
FROM bbenzikry/spark-eks:spark3-edge
# pyspark2
FROM bbenzikry/spark-eks:pyspark2-latest
# pyspark3
FROM bbenzikry/spark-eks:pyspark3-latest
# pyspark3-edge
FROM bbenzikry/spark-eks:pyspark3-edge
hadoopConf:
# IRSA configuration
"fs.s3a.aws.credentials.provider": "com.amazonaws.auth.WebIdentityTokenCredentialsProvider"
driver:
.....
labels:
.....
serviceAccount: SERVICE_ACCOUNT_NAME
# See: https://github.com/kubernetes/kubernetes/issues/82573
securityContext:
fsGroup: 65534
{
/* Example below is an example configuration for accessing db1/table1.
Modify this as you deem worthy for potential access.
Last 3 resources must be present for your region.
*/
"Effect": "Allow",
"Action": ["glue:*Database*", "glue:*Table*", "glue:*Partition*"],
"Resource": [
"arn:aws:glue:us-west-2:123456789012:catalog",
"arn:aws:glue:us-west-2:123456789012:database/db1",
"arn:aws:glue:us-west-2:123456789012:table/db1/table1",
"arn:aws:glue:eu-west-1:123456789012:database/default",
"arn:aws:glue:eu-west-1:123456789012:database/global_temp",
"arn:aws:glue:eu-west-1:123456789012:database/parquet"
]
}
Content type
Image
Digest
Size
869.5 MB
Last updated
about 6 years ago
docker pull bbenzikry/spark-eks:spark3-eb0bc39