Enable https with nginx-ingress, cert-manager and letsencrypt

Hello,
I have followed the documentation to enable a nginx-ingress and it is working : https://zero-to-jupyterhub.readthedocs.io/en/latest/administrator/advanced.html#ingress

Then i wanted to enable https but the documentation refers to kube-lego which is deprecated :
https://zero-to-jupyterhub.readthedocs.io/en/latest/administrator/advanced.html#ingress-and-automatic-https-with-kube-lego-let-s-encrypt

I tried to use cert-manager instead, installed with helm, but without success. Did anyone manage to do that?

Yes.

This assumes that you have correctly installed cert-manager with a cluster-issuer named letsencrypt-prod, using nginx ingress.

The following configuration is sufficient:

ingress:
  enabled: true
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/ssl-redirect: "false"
    cert-manager.io/cluster-issuer: letsencrypt-prod
  hosts:
    - notebook.example.com
  tls:
    - hosts:
      - notebook.example.com
      secretName: a_secret_name

proxy:
  service:
    type: ClusterIP
  https:
    enabled: false
  secretToken: 'something entropic'
1 Like

Sounds similar to the Zero-to-BinderHub HTTPS setup: https://binderhub.readthedocs.io/en/latest/https.html