How ingress routing works

0 votes

I’ve seen a few kubernetes cluster example where they have ingress class added with annotations, for example:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
 annotations:
    kubernetes.io/ingress.class: nginx
spec:
 rules:
   - host: testsvc.k8s.privatecloud.com
     http:

Also, There could be many services configured with the hosts rule like,

testsvc.k8s.privatecloud.com
testsvc1.k8s.privatecloud.com
testsvc2.k8s.privatecloud.com

How does the routing in ingress works?

Sep 11, 2018 in Kubernetes by lina
• 8,110 points
66 views

1 answer to this question.

0 votes

The dns of all the host name points to the load balancer through which all the traffic is routed to the ingress controller’s nginx.

Kubernetes ingress works as proxy between the internal cluster and the external network.

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test
  annotations:
    ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - host: foo.bar.com
    http:
      paths:
      - path: /foo
        backend:
          serviceName: s1
          servicePort: 80
      - path: /bar
        backend:
          serviceName: s2
          servicePort: 80
answered Sep 11, 2018 by Kalgi
• 40,420 points

Related Questions In Kubernetes

0 votes
1 answer

Issue with Kubernetes ingress routing to Nextjs applications

You’re using nginx ingress controller which does ...READ MORE

answered Sep 11, 2018 in Kubernetes by Kalgi
• 40,420 points
174 views
0 votes
1 answer

How to rewrite all non-www traffic to www subdomain?-kubernetes ingress

The ingress.kubernetes.io/rewrite-target is used for rewriting the request URI, ...READ MORE

answered Sep 11, 2018 in Kubernetes by Kalgi
• 40,420 points
692 views
0 votes
1 answer
0 votes
1 answer

How to use gravitational teleport in a container/kubernetes environment?

You can use teleport to augment kubernetes ...READ MORE

answered Jun 28, 2018 in Kubernetes by ajs3033
• 7,280 points
315 views
0 votes
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17 in Others by anonymous
2,049 views
+3 votes
1 answer
0 votes
1 answer

Customize the routing logic in kubernetes ingress controller

Try building your own customized image based on ...READ MORE

answered Sep 7, 2018 in Kubernetes by Kalgi
• 40,420 points
107 views
0 votes
1 answer

Kubernetes Ingress Path only works with /

Have you changed the context path in ...READ MORE

answered Sep 7, 2018 in Kubernetes by Kalgi
• 40,420 points
218 views