Hi I am currently trying to deploy my application using google kubernetes engine. I exposed my front and back services as NodePort, I created a global static IP address named "ip". and I created an ingress ressource . The ingress ressource was working fine until I added the path rules.
here Is my ingress ressource
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress
annotations:
kubernetes.io/ingress.global-static-ip-name: ip
labels:
app: myapp
part: ingress
spec:
rules:
- http:
paths:
- path: /*
backend:
serviceName: backapp
servicePort: 9000
- path: /front/*
backend:
serviceName: frontapp
servicePort: 3000
And here is my services back :
apiVersion: v1 kind: Service metadata:
labels:
app: myapp
part: back
name: backapp
namespace: default
spec:
clusterIP: 10.*.*.*
externalTrafficPolicy: Cluster
ports:
- nodePort: 30646
port: 9000
protocol: TCP
targetPort: 9000
selector:
app: myapp
part: back
sessionAffinity: None
type: NodePort
front:
apiVersion: v1
kind: Service
metadata:
labels:
app: myapp
part: front
name: frontapp
namespace: default
spec:
clusterIP: 10.*.*.*
externalTrafficPolicy: Cluster
ports:
- nodePort: 31609
port: 3000
protocol: TCP
targetPort: 3000
selector:
app: myapp
part: front
sessionAffinity: None
type: NodePort
Every time I try to go to http://external-ingress-ip/front
http://external-ingress-ip/front/home
All I get is default backend - 404
So my question is: what is wrong with my configuration, what changed when I added the paths ?
*
sign from the path and the forward slash, what happens? – iomv