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,220 points
771 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
• 52,350 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
• 52,350 points
2,530 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
• 52,350 points
3,717 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,300 points
2,467 views
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

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

answered Jan 17, 2019 in Others by anonymous
15,477 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,035 views
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
• 52,350 points
1,333 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
• 52,350 points
2,719 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP