I have an ingress defined as:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: foo-ingress
annotations:
kubernetes.io/ingress.global-static-ip-name: zaz-address
kubernetes.io/ingress.allow-http: "false"
ingress.gcp.kubernetes.io/pre-shared-cert: foo-bar-com
spec:
rules:
- host: foo.bar.com
http:
paths:
- path: /zaz/*
backend:
serviceName: zaz-service
servicePort: 8080
Then the service zap-service
is a nodeport
defined as:
apiVersion: v1
kind: Service
metadata:
name: zaz-service
namespace: default
spec:
clusterIP: 10.27.255.88
externalTrafficPolicy: Cluster
ports:
- nodePort: 32455
port: 8080
protocol: TCP
targetPort: 8080
selector:
app: zap
sessionAffinity: None
type: NodePort
The nodeport
is successfully selecting the two pods behind it serving my service. I can see in the GKE
services list that the nodeport
has an IP that looks internal.
When I check in the same interface the ingress
, it also looks all fine, but serving zero pods.
When I describe the ingress
on the other hand I can see:
Rules:
Host Path Backends
---- ---- --------
foo.bar.com
/zaz/* zaz-service:8080 (<none>)
Which looks like the ingress
is unable to resolve the service IP
. What am I doing wrong here? I cannot access the service through the external domain name, I am getting an error 404
.
How can I make the ingress translate the domain name zaz-service
into the proper IP
so it can redirect traffic there?