Zero-to-jupyterhub-k8s: Deploying jupyterhub onto a static IP address

Created on 3 Jul 2018  路  11Comments  路  Source: jupyterhub/zero-to-jupyterhub-k8s

I am on GKE and trying to deploy jupyterhub onto a pre-existing IP address that is mapped to a domain name. I had to delete/purge a previous deployment and want to launch jupyterhub back onto that IP address. Is this possible?

I've tried editing the proxy-public service LoadBalancer IP setting from kubectl and it does not work.

https://github.com/kubernetes/helm/issues/3560
https://kubernetes.io/docs/concepts/services-networking/service/#choosing-your-own-ip-address

documentation help wanted

Most helpful comment

Thank you! I'm aiming to get back to you about where would be suitable today after reading through it once again.

All 11 comments

Hmmm, I don't know, but I'll provide you some of my confusion written out :dagger:

I think this might have changed recently with GKE. They said that they have started deleting LoadBalancers along with Ingress declarations.

Were your LoadBalancer removed?

But I lack knowledge, I'm asking myself - when is the IP renewed? When the LoadBalancer object is replaced? Or is it when the proxy-public service is replaced? Hmmm... Also along with service declarations comes Endpoint declarations that are like childs to the service...

We solved this thanks to @yuvipanda's suggestion. I update the values.yml file to show this

proxy: 
   service:
     loadBalancerIP: xxx.xxx.xxx.xxx

I admit, I needed to run helm upgrade a number of times before it actually changed the loadbalancerIP address. I also noticed that deleting the proxy-pod also helps but I have not figured out exactly how to do this in one and done fashion.

@consideRatio @yuvipanda I'd actually like to make some documentation/notes for this. Is there a place that is best to do so in the docs?

Thank you! I'm aiming to get back to you about where would be suitable today after reading through it once again.

:heart: for anyone that wants to add it to the docs, I lost track of this. Something short about reserving IPs is often possible, and the reserved IP should be declared on proxy.service.loadBanlancerIP, perhaps the best place to write this would be in schema.yaml.

That is in turn rendered into the configuration reference documentation

On it, as I would have also wished to find that quicker by myself.
What is you policy on the completeness of the configuration reference documentation in the schema.yaml?

Maybe I just didn't find the correct guidelines, but for example https is also missing in the schema.yaml for the proxy object, while it is partly described in the security section of the docs and also contained as in the example values.yaml (which I am very glad to have found).
Actually nothing besides the required secretToken is yet listed for the proxy object.

Might be that it was just not done yet, or that you don't want to overwhelm users by having everything in one large list. (Even though that would be the most intuitive to search.)

鉂わ笍 for anyone that wants to add it to the docs, I lost track of this. Something short about reserving IPs is often possible, and the reserved IP should be declared on proxy.service.loadBanlancerIP, perhaps the best place to write this would be in schema.yaml.

That is in turn rendered into the configuration reference documentation

Closing again thanks to #1003. (Feel free to reopen if needed)

For those that are stuck: loadBanlancerIP is spelt wrong, should be loadBalancerIP

If you copy paste like I did the IP will be stuck in pending...

Nice catch @toblender! I made an edit, it is corrected now!

Think this might need to be reopened: I've tried the prescribed settings on GKE, but while proxy.service.loadBalancerIP sets proxy-public's external IP pending indefinitely, hub.service.loadBalancerIP ignores the value and leads to the cluster assigning its own IP.

Are you specifying different IPs for proxy.service.loadBalancerIP and hub.service.loadBalancerIP?

Here is what worked for me on GKE:
1) got a GCP external ip address ( regional type, matching the region of the cluster )
2) used that ip address in the config yaml for proxy.service.loadBalancerIP
3) applied the new yaml to the cluster
4) killed the proxy pod ( it should restart with the new ip address )
5) browsed to the ip address and confirmed it worked

Was this page helpful?
0 / 5 - 0 ratings

Related issues

consideRatio picture consideRatio  路  3Comments

ToniChaz picture ToniChaz  路  4Comments

jonathanballs picture jonathanballs  路  3Comments

consideRatio picture consideRatio  路  3Comments

jgerardsimcock picture jgerardsimcock  路  4Comments