I installed Minio (I installed Minio in Kubernetes using helm) with TLS using a self-signed certificate. Previsouly I was able to run my spark job with Minio without TLS. Now it is not possible to conect to Minio (normal !)
Then, I created a truststore file from the tls certificate
keytool -import \
-alias tls \
-file tls.crt \
-keystore truststore.jks \
-storepass "$minioTruststorePass" \
-noprompt
I create a Kubernetes secret with the content of the truststore and I use in the spark-defaults.conf the following option to let spark use the trustore:
spark.kubernetes.driver.secrets.minio-truststore-secret
Finally, I did all the following change in my spark-defaults.conf but same problem
spark.hadoop.fs.s3a.endpoint https://smart-agriculture-minio:9000
spark.hadoop.fs.s3.awsAccessKeyId <s3aAccessKey>
spark.hadoop.fs.s3.awsSecretAccessKey <s3aSecretKey>
spark.hadoop.fs.s3.impl org.apache.hadoop.fs.s3a.S3AFileSystem
spark.hadoop.fs.s3a.access.key <s3aAccessKey>
spark.hadoop.fs.s3a.secret.key <s3aSecretKey>
spark.hadoop.fs.s3a.path.style.access true
spark.hadoop.fs.s3a.impl org.apache.hadoop.fs.s3a.S3AFileSystem
spark.hadoop.fs.s3a.connection.ssl.enabled true
spark.driver.extraJavaOptions -Djavax.net.ssl.trustStore=/opt/spark/conf/minio/truststore/truststore.jks -Djavax.net.ssl.trustStorePassword=<minioTruststorePass>
spark.executor.extraJavaOptions -Djavax.net.ssl.trustStore=/opt/spark/conf/minio/truststore/truststore.jks -Djavax.net.ssl.trustStorePassword=<minioTruststorePass>
Have you ever faced this problem and do you have an idea to solve it ?
Thanks