-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kubernetes ingress #626
Comments
You can find an ingress template at our ansible scripts. The issue that I see with providing the yaml at eg repo is that there are different versions of ingress implementations and from playing with couple ones they all require different configurations and I don't think we can easily maintain/test on the multiple available ingress implementations, but I am open to suggestions... maybe just add this example to the documentation and users would translate/configure based on the ingress they are using ? |
One way I've seen around this, besides making ingress itself optional, is to support configurable ingress annotation keys/values. Here's an example of an arbitrary Helm template that takes this approach: https://github.com/helm/charts/blob/master/incubator/istio/templates/deployment/ingress.yaml .. Note the That way, it's up to the user deploying (in this case, deploying the Helm chart) to make the Ingress resource work with their own ingress implementation. But you make a fair point that maybe it's not worth trying to make this work for the variety of ingress implementations. As soon as you support Ingress resources, the next request will be for Certificate resources.. Documentation examples may be sufficient, especially if there's a base Helm chart (as per #625) that users can derive from to add their own custom resources like Ingresses and Certificates. |
Some additional thoughts from @kevin-bates on the topic of ingress from #625:
|
Here is an example using Traefik:
Here is an example using Nginx
|
BTW, why should EG use If EG is designed to run as a backend service, then residing in cluster network looks reasonable to me. i.e. headless service. |
@esevan - I see your point. I suppose that works if the notebook instance is also running in the same k8s cluster (i.e., the combined Hub/EG scenario). However, I view our primary configuration as more of a Kernel As A Service model where the notebook instance is running external to the EG k8s cluster. For that, we need to provide access into EG. Would those descriptions match where your question is coming from? I suppose the I wonder if my view of KAAS is not appropriate for K8s? The JupyterHub/EG scenario is very compelling and I could see that being the primary use case. |
@kevin-bates Thanks for your response. I'm using only The JupyterHub/EG scenario which is in-cluster scenario, and I admit I have a narrow view of EG use case in k8s. I think this issue comes to "What is our default scenario" and "How to support other options?. |
@esevan - yes, I agree that In the typical Hub setup, where Notebooks are spawned, how is each spawned Notebook server exposed outside the cluster? Does the Hub essentially act like a proxy such that its port is the only thing exposed? (Sorry, I haven't spent enough time with Hub.) |
For what it's worth, I did file this ticket originally with the non-Hub, local Jupyter use case in mind. Meaning, Jupyter is running locally on a dev's laptop, and connecting to a remote in-cluster Enterprise Gateway via nb2kg. A dev with access to the cluster can always set up a manual |
@kevin-bates I'm using hub - kubespawner combination and hub spawns notebooks in Notebook is exposed via hub ingress or loadBalancer with Anyhow, if hub scenario is truly compelling, we can set |
@witten Interesting! I didn't reach that scenario because I started from Hub. It sounds great to put notebook instance in local. User might use server resource and local resource at the same time with that use case. Now I fully understand EG has lots of deployment views, thanks! |
I've found myself flip/flopping around whether ClusterIP or NodePort should be the default, but believe ClusterIP is probably best for the following reasons. I'd love to hear what others think...
Regardless of either value, internal access can still be obtained using Regarding the ingress entries that @lresende posted above... Would anyone want to create an |
I agree that ClusterIP probably makes sense over NodePort! |
@akchinSTC - isn't this closed by #651? |
Yes it should be resolved by #651, agreed that EG should be ClusterIP/internal service DNS and be exposted via Ingress (ingress controller) |
sorry i can't get all of your , i want set ingress path to access different notebook instance but failed, but only use ingress path "/" access one notebook is ok, actually am developing PaaS which allow different user to create different notebook, but i dnt want use NodePort that's not enough. how can use EG to solve it ? |
@xxlest For notebook instances, I recommend to use Jupyter Hub project. It will automate authentication, and to proxy user to their own notebook instance respectively. I'm not sure what enterprise scheduler you're using, but looking at this blog is surely very helpful for you to work with EG. |
@esevan Thanks very much, i will try the material u showed, am using k8s as scheduler, and notebook images which are tensorflow, mxnet, pytorch, caffe… user can login our PaaS and select quota of resource(CPU/GPU/MEM/Storage) for training model and serving model, we’ve also integrate istio as servicemesh for monitoring, so many user's notebook and we need provide web link connect jupyter notebook, then we need proxy behind ingress. |
Based on the documentation, it sounds like the current approach for reaching the Jupyter Enterprise Gateway running on Kubernetes is via a NodePort. However, on most clusters, this does not actually make the port available to the outside world, but rather just to internal cluster IPs.
So this ticket is a request to add support for including an optional Kubernetes Ingress resource when deploying Jupyter Enterprise Gateway. The idea is that if the cluster is configured for ingress, then the Ingress resource will thereby make the Gateway accessible from the outside world. This makes it much more convenient to reach the Gateway, say from a developer's local laptop. (Without ingress, a developer may need to maintain a
kubectl port-forward
proxy or similar.)Note that making ingress optional may be easier to do once a Helm chart is available (#625).
The text was updated successfully, but these errors were encountered: