A while ago I setup JupyterHub running on Google Cloud by following the z2jh tutorial. I originally enabled login using OAuth via GitHub, but so far I’ve just been using the IP address for my server and connecting using HTTP.
I’ve finally got around to getting a domain for my Hub, and I’m now trying to follow the instructions here describing how to setup HTTPS using Let’s Encrypt.
Having created an A
record for my domain, I added this to my config.yaml, as described, and then upgraded my Hub.
proxy:
https:
hosts:
- <your-domain-name>
letsencrypt:
contactEmail: <your-email-address>
This upgrade took place successfully, and https://my.domain.name now directs to the login page for my Hub, which is great. However, when I tried to login I received a Bad request
error and belatedly realised I probably also need to modify the callbackUrl
in the auth
section of config.yaml
auth:
github:
clientId: xxxxx
clientSecret: xxxxxx
callbackUrl: <your-domain-name>
and presumably I need to update the Homepage URL
and Authorization callback URL
settings in my GitHub OAuth App as well.
Having made these changes, I tried to upgrade again, but now I get
UPGRADE FAILED
Error: kind ConfigMap with the name "nginx-proxy-config" already exists in the cluster and wasn't defined in the previous release.
Before upgrading, please either delete the resource from the cluster or remove it from the chart
I don’t know whether this would have happened anyway, or whether I’ve messed it up by upgrading before modifying the OAuth settings.
Can anybody offer any advice, please? Is it safe to “delete the resource from the cluster or remove it from the chart” and, if so, how to I do that?
(For the time being, I’ve changed all my settings back to HTTP with the original IP address and everything seems to be working as before, but I’d like to switch to HTTPS if possible).
Thank you!