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 in Kubernetes by Namik
• 1,210 points
39 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 by Sirajul
• 37,930 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
• 42,410 points
88 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,280 points
395 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
• 42,410 points
824 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
3,030 views
+3 votes
1 answer
0 votes
1 answer
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 in Kubernetes by Sirajul
• 37,930 points
39 views