Kubernetes Ingress servicePort alternative

0 votes

In order to specify ingress bancked, we have to specify servicePort and serviceName, for example:

backend:
      serviceName: test
      servicePort: 80

I want to create services with random ports and avoid specifying them in the ingress definition. Are there any alternatives to servicePort? Maybe use port name or targetPort that are assigned in the service?

Sep 10, 2018 in Kubernetes by lina
• 8,220 points
1,372 views

2 answers to this question.

0 votes

AFAIK usual pattern is to use Ingress with a service type ClusterIP, so you will not be concerned about port collisions.
You may have separate service with same selector for e.g. NodePort if needed, but this will not be concern of Ingress.

answered Sep 10, 2018 by Kalgi
• 52,350 points
+1 vote

Check out this example that allows to avoid all the hassle with setting up ingress, certbot and proxy https://github.com/gwrun/tutorials/tree/main/k8s/pod

answered Nov 20, 2020 by anonymous

Related Questions In Kubernetes

0 votes
1 answer

Forcing ssl for Kubernetes Ingress on GKE

https://github.com/kubernetes/ingress-gce#frontend-https If you want to block http, you ...READ MORE

answered Sep 6, 2018 in Kubernetes by ajs3033
• 7,300 points
4,240 views
0 votes
2 answers

Deny access to some specific paths while using kubernetes ingress

Try to create two Ingresses first by default ...READ MORE

answered Sep 21, 2018 in Kubernetes by Nilesh
• 7,060 points
12,118 views
0 votes
1 answer

Filter source ip in kubernetes ingress in GCE

This feature currently works only with nginx. Example ...READ MORE

answered Sep 7, 2018 in Kubernetes by Kalgi
• 52,350 points
1,276 views
0 votes
2 answers

single point of entry for multiple services in kubernetes ingress

I tried having something similar too. Deployment apiVersion: extensions/v1beta1 kind: ...READ MORE

answered Sep 7, 2018 in Kubernetes by Hannah
• 18,520 points
2,747 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,366 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,574 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,062 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