Setting Up HTTPS for Jupyterhub on Kubernetes


#1

Hello, when I use https://zero-to-jupyterhub.readthedocs.io/en/latest/security.html to set up https, I get the following error:

Upon putting the following instructions into my config.yml for my google kubernetes cluster setup with the defaults from the guide:

https:
    hosts:
      - my_domain.com
    letsencrypt:
      contactEmail: my_email

under the proxy entry within the config.yaml, I get the error: UPGRADE FAILED: no ConfigMap with the name "nginx-proxy-config" found. If I remove these lines and run the entry again, the upgrade succeeds… any suggestions on what could be causing this error?


#2

Heya! I think you are running into this helm bug: https://github.com/jupyterhub/zero-to-jupyterhub-k8s/pull/620

If your upgrade succeeds after you remove it, can you add it back and try again? Usually that works for me.


#3

Hi @yuvipanda thanks for the reply!

I just tried commenting out the https, upgrading the chart and waiting for deployed status, then I uncommented the https code, attempted to upgrade the chart, and I got the same error as before. Any other suggestions?


#4

Hmm, can you pass --debug and --dry-run flags to the helm upgrade command and show us the output? Note that this is going to have some secrets you might wanna strip out…

Another thing to try is to do a helm list, find the revision number of your release that is failing, and then do a helm rollback to earlier revision numbers until it works fine. I’ve used that with success many times.

Also make sure you’re on the latest version of helm. The issue is a fundamental architectural problem in helm, and should be removed with helm 3.


#5

Hi @yuvipanda, just got back into trying this. I ran with the flags you mentioned and I got this log. This is a totally vanilla installation… I tried your suggestions, and the suggestions in the PR you linked, but the deploy with https options stays failed. Any other suggestions? Thanks for all your help thus far! If it makes any difference, I’m using gke.


#6

extraConfig expects to be a dict of configs:

hub:
extraConfig:
part1: |

Maybe that will fix the latest error?


#7

I ended up rolling back on helm to the last working version, then updating again and that seemed to do the trick. I guess I hadn’t been rolling back correctly before. Thank you very much for the help!