Kubernetes Ingress Controllers for URL Mapping

I need each of my users to access the service at a special URL, for example. abccompany.mycloudapp.com, each service is a kubernet service. I look at the input controllers, but I need a way to use the host wildcard field and somehow read the value in the path: and service: fields; here is a sample input controller of what i mean:

apiVersion: extensions/v1beta1 kind: Ingress metadata: name: test spec: rules: - host: *.bar.com http: paths: - path: /{{ value of * in * .bar.com }} backend: serviceName: {{value of * in *.bar.com }}Svc servicePort: 80 
+7
nginx kubernetes
source share
1 answer

If you use controllers, you can enable the host name and go to the various backend services. It looks like you don’t want to list all the subdomains β†’ service mappings, in which case you probably need to write your own controller that writes the nginx configuration that uses $ http_host in the corresponding proxy bytes or redirects strings. Take a snapshot ( https://github.com/kubernetes/contrib/tree/master/ingress/controllers ) and create errors in the same repo if you need help.

+2
source share

All Articles