GitHub user andrusha opened a pull request:

    [SPARK-23668][K8S] Add config option for passing through k8s 

    ## What changes were proposed in this pull request?
    Pass through the `imagePullSecrets` option to the k8s pod in order to allow 
user to access private image registries.
    ## How was this patch tested?
    Unit tests + manual testing.
    Manual testing procedure:
    1. Have private image registry.
    2. Spark-submit application with no `spark.kubernetes.imagePullSecret` set. 
Do `kubectl describe pod ...`. See the error message: 
    Error syncing pod, skipping: failed to "StartContainer" for 
"spark-kubernetes-driver" with ErrImagePull: "rpc error: code = 2 desc = Error: 
Status 400 trying to pull repository rtdp/hyperconvergence: \"{\\n  
\\\"errors\\\" : [ {\\n    \\\"status\\\" : 400,\\n    \\\"message\\\" : 
\\\"Unsupported docker v1 repository request for '...'\\\"\\n  } ]\\n}\""
    3. Create secret `kubectl create secret docker-registry ...`
    4. Spark-submit with `spark.kubernetes.imagePullSecret` set to the new 
secret. See that deployment was successful.

You can merge this pull request into a Git repository by running:

    $ git pull spark-23668-image-pull-secrets

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #20811
commit dc2c1852a5056a023de64855d1f3b1ce5fd050b9
Author: Andrew Korzhuev <andrew.korzhuev@...>
Date:   2018-03-13T14:05:58Z

    Add config option for passing through k8s Pod.spec.imagePullSecrets
    This will allow users to access images from private registries.



To unsubscribe, e-mail:
For additional commands, e-mail:

Reply via email to