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,035 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,360 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
3,968 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,050 points
11,507 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,360 points
1,097 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,570 points
2,330 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,360 points
1,136 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
14,584 views
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 12, 2019 in Kubernetes by Kalgi
• 52,360 points

reshown Apr 12, 2019 by Kalgi 6,066 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