How to forward port 8080 container - 8080 service - 8080 ingress - 80 browser

0 votes
How to forward port '8080 (container)->8080 (service)-> 8080 (ingress)->80 (browser)'? How is it done?
Jul 19, 2019 in Kubernetes by Namik
• 1,230 points
3,076 views

1 answer to this question.

0 votes
  • The ingress is exposing port 80 externally for the browser to access, and connecting to a service that listens on 8080. 

  • The ingress will listen on port 80 by default. 

  • An "ingress controller" is a pod that receives external traffic and handles the ingress  and is configured by an ingress resource.

  • For this you need to configure ingress selector and if no 'ingress controller selector' is specified then no ingress controller will control the ingress.

  • simple ingress Config will look like:

host: abc.org
http:
paths:
backend:
serviceName: abc-service
servicePort: 8080

Then the service will look like:

kind: Service
apiVersion: v1
metadata:
name: abc-service
spec:
ports:
protocol: TCP
port: 8080 # this is the port the service listens on
targetPort: 8080
answered Jul 19, 2019 by Sirajul
• 59,230 points

Related Questions In Kubernetes

0 votes
2 answers

Not able to expose port 80 on the host, kubernetes ingress

I was facing the same error. The nginix ...READ MORE

answered Sep 11, 2018 in Kubernetes by Kalgi
• 52,360 points
1,745 views
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,226 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,360 points
3,433 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,587 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
0 votes
1 answer

How do I expose a service to a host outside the cluster?

There are two ways by which we ...READ MORE

answered Jul 12, 2019 in Kubernetes by Sirajul
• 59,230 points
567 views
0 votes
1 answer

How do i tie a service to a pod or a set of pods?

By declaring pods with the label(s) and ...READ MORE

answered Jul 16, 2019 in Kubernetes by Sirajul
• 59,230 points
1,363 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