I am trying to deploy my application using GKE: I added an ingress ressource using this link https://kubernetes.io/docs/concepts/services-networking/ingress/
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: ingress
annotations:
kubernetes.io/ingress.global-static-ip-name: app-ip
labels:
app: myapp
part: ingress
spec:
rules:
- http:
paths:
- path: /*
backend:
serviceName: frontapp
servicePort: 3000
- path: /back/*
backend:
serviceName: backapp
servicePort: 9000
and exposed my services as NodePort : Only the service mapped to "/" works ( I tested with the both front and back services)
(paths mapped to this do not work
[IP]/back/(my paths)
In the tutorial I found this sentence:
You need an Ingress controller to satisfy an Ingress, simply creating the resource will have no effect.
My question is:
1) what is the difference between the ingress ressource and controller?
2)Does GKE offer an ingress controller by default or should I add it manually in order to fix my path issue ?
3)What else could be wrong with my configuration
Ps: this one of my services
apiVersion: v1
kind: Service
metadata:
labels:
app: myapp
part: back
name: backapp
namespace: default
spec:
ports:
- port: 9000
protocol: TCP
targetPort: 9000 # Port on the pod with 'back' application
selector:
app: myapp
part: back
type: NodePort
and this what I get when I describe my ingress
Annotations:
ingress.kubernetes.io/url-map: k8s-um-default-ingress--17c7235ab3ece101
kubernetes.io/ingress.global-static-ip-name: app-ip
ingress.kubernetes.io/backends: {"k8s-be-31278--17c7235ab3ece101":"HEALTHY","k8s-be-32112--17c7235ab3ece101":"HEALTHY","k8s-be-32287--17c7235ab3ece101":"HEALTHY"}
ingress.kubernetes.io/forwarding-rule: k8s-fw-default-ingress--17c7235ab3ece101
ingress.kubernetes.io/target-proxy: k8s-tp-default-ingress--17c7235ab3ece101
Events: Type Reason Age From Message ---- ------ ---- ----
-------
Warning UrlMap 46m (x5 over 4h) loadbalancer-controller googleapi: Error 412: Invalid fingerprint., conditionNotMet
Normal Service 4m (x22 over 2h) loadbalancer-controller no user specified default backend, using system default
path
..../back/foo/bar
will match/back
. – AWippler