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,100 points
50 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
• 35,800 points

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,040 points
696 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
• 35,800 points
126 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
• 14,080 points
44 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
• 35,800 points
45 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
481 views
+3 votes
1 answer
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
• 6,900 points
405 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.