Ingress for SpringBoot service

1.5k Views Asked by At

I am running on Vultr public cloud with a CoreOS Kubernetes. I am working on configuring a ingress controller so I can reach my backend SpringBoot service.

I have a Spring Boot service "springboot" running on port 30123.

I have this ingress yaml from the Kubernetes documentation with modified to my service:

ingress.yaml
------------
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: test-ingress
spec:
  backend:
    serviceName: springboot
    servicePort: 31922

kubectl get ing

Name HOSTS ADDRESS PORTS AGE

test-ingress * 80 2m

curl mydns.com Connection refused.

I am not sure if I am understanding how it's supposed to work.

Can someone help?

thanks

1

There are 1 best solutions below

0
On

As mentioned by @slintes, did you add an IngressController ? You can add one (nginx ingress controller) easily with the command :

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/cloud/deploy.yaml

By the way in your question you're saying that you have a spring boot app on port 30123 but your ingress points to the 31922 port. Is it normal ?

Hope it helps.