Closed olberger closed 4 years ago
That site is useful but I'll bet we can use wildcards with the nginx ingress controller. https://github.com/kubernetes/ingress-nginx/issues/8 seems to indicate so, though we won't be using wildcard for subdomain but rather for the whole domain. I haven't had a chance yet but this should be very easy to test with our current selfmedicate setup and some minimally edited ingress definitions
Good news, this works really well just by omitting the host
key in the spec. The below works great:
spec:
rules:
- http:
paths:
- backend:
serviceName: syringe
servicePort: 8086
path: /syringe
Syringe is accessible even via IP address:
curl http://127.0.0.1:30001/syringe/exp/syringeinfo
{"buildSha":"39e1269c83a0dd3f23f529821cf7a3d605ee5fe1","antidoteSha":"5fd7804377dd0e8622dc6e5ab76287156160fd51\n","imageVersion":"v0.4.0"}%
We should modify the ingress definitions in both antidote-web and syringe in this repo accordingly, and rip out all of the hosts file manipulation magic.
Thanks @Mierdin you beat me to getting this working.
I can confirm this works, changing manifests/syringe-k8s.yaml
contents.
Even works with KinD (Kubernetes in Docker)
This is done in https://github.com/nre-learning/antidote-selfmedicate/pull/69/
The discussion in tuesday october the 22nd popped something in my mind, when @Mierdin mentioned asterisk wildcard...
Maybe this can be of use: http://xip.io/ can be used as a widlcard DNS service. I've seen it used in many cloud-related demos/tutorials.
Not exactly sure whether this would apply to the current situation, but maybe that helps working around the need to edit the hosts file.