Search code examples
kuberneteskubernetes-helmjupyterhubamazon-eks

Adding SAML to JupyterHub Kubernetes deployment with custom docker image


I need to use SAML to authenticate users to JupyterHub however I don't know how to modify the jupyterhub/k8s-hub docker image to do so.

I know that I need to open the docker image, modify the config then create a new image. Then host this image in a container registry like ECR, pass the URI to the helm chart and upgrade my deployment. However, when I open the jupyterhub/k8s-hub image it immediately shuts down because it can't find the proxy and the rest of the deployment so I can't modify it in any way. Does anyone have experience with JupyterHub in EKS that could help? Many thanks!


Solution

  • I know that I need to open the docker image, modify the config then create a new image.

    Although it is still possible to do it the way you described, it is definitely not recommended approach. This method of creating an image is not reproducible and should be avoided. Compare with point 5 of this article or this thread on StackOverflow.

    Instead of making changes to the running container and saving it as your new custom image using docker commit you should rather build a new image starting from the base image you want to use using Dockerfile. You can read more on Dockerfiles and building docker images in official docker documentation:

    Best practices for writing Dockerfiles

    Get Started, Part 2: Containers (Define a container with Dockerfile)