> 2b. Ingress Controller route/path/url annotation hell...
Sorry, but that is no hard at all and I can't imagine why you compare it to "hell". It is literally less than 20 lines to define an ingress object.
> 2b. Ingress Controller route/path/url annotation hell...
Sorry, but that is no hard at all and I can't imagine why you compare it to "hell". It is literally less than 20 lines to define an ingress object.
I've been very fan of using docker for all our dev stuff. To run something locally before it meant having correct version of lots of stuff, and possible having installed some database, configure it correctly etc. Onboarding could be days of configuring this stuff and having something fail. Now it's just download docker, run our ./setup.sh that spins up the various docker images, and one's almost good to go.
Not all are fully featured in their open source form, so in some cases you need to purchase the tool to do something like url-rewrite. In some cases, the solution exists, but is something contributed via community (better than none, great in theory, but brittle given the pace of platform change.)
Further, once you actually try to spend time on it, you find there is little to no documentation on topics such as url-rewrite.
It is all interesting, but then you realize you actually have deadlines -- and now you've spent half the day on futzing around with annotation permutations (since there are few/no docs) and you have not actually started working on the actual task of tuning a model on PyTorch...that is when you drop down to just 'docker run...'
It is all worth learning, and doing, but only if you need to. If I need to make something -- in this story Jupyter+PyTorch -- work for many people and be elastic and scalable, then sure, i'll go thru the effort. But if I need a throw-away instance for the day, then it is not worth doing.
I wonder how many lines from this "./setup.sh" could have been avoided by trying a bit harder to understand how the ingress object works.
I no longer see lazyness as a good trait in programing.
...and this is your idea of easy? For something that should be as simple as "this path goes to this group" + "this group is these containers"?
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: myingress
spec:
rules:
- http:
paths:
- host: example.com
path: /
pathType: Prefix
backend:
service:
name: test
port:
number: 80
Since everything except "spec" is common to all Kubernetes resources, this arguably isn't much different than an Nginx configuration file: upstream backend {
server some-backend:80;
}
server {
listen :80;
server_name example.com;
location / {
proxy_pass http://backend;
}
}...on docker, I can do this in 20sec:
"docker run .... -p 8888:8888"
"docker run .... -p 8888:8889"
Enter k8s. Jupyter does not appear to allow path prefix-based url schemes, so the above wont work. That means, you can use "/" and the default-host, and you're good for your first instance. But what about the next instance? Now you need two different domains somehow supported. Unclear how this works, because unclear whose "problem" it is. It isnt clearly an NGINX problem, or a Jupyter problem, or a k8s problem, but a problem nonetheless. NGINX docs on multiple distinct host based ingress is thinner than that for base usage cases.
I do appreciate your post, but I think my point is that solving 80% of the cases isn't sufficient to make the case for adhoc k8s-usage-by-default on desktop. I'm sure I can make the above work (e.g. for group or Prod usage), but to make that effort worth it, there has to be a reason to do it. When I have an alternative of running two "docker run" commands for adhoc usage, i'm not sure if it is.
Your "docker run" example is equivalent to just accessing the Kubernetes services directly on their host names or IPs. For example, with Docker for Desktop, all services of type "LoadBalancer" will automatically get exposed on the host, just like with "docker run".
Ingresses are for setting up HTTP proxying of multiple services on a single host name.