I am getting a strange error that I cannot debug when I tried to create an ingress today (that was working a couple days ago):
googleapi: Error 400: Invalid value for field 'namedPorts[2].port': '0'. Must be greater than or equal to 1, invalid
This Stackoverflow answer doesn't work for me as there are no port mappings on my instance groups.
Any insight into this?
This is the manifest:
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: test
spec:
backend:
serviceName: echo-app
servicePort: 88
---
apiVersion: v1
kind: Service
metadata:
name: echo-app
spec:
type: NodePort
selector:
app: echo-app
ports:
- name: http
port: 88
protocol: TCP
targetPort: 8000
kubectl version:
Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.5", GitCommit:"17d7182a7ccbb167074be7a87f0a68bd00d58d97", GitTreeState:"clean", BuildDate:"2017-08-31T09:14:02Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.5", GitCommit:"17d7182a7ccbb167074be7a87f0a68bd00d58d97", GitTreeState:"clean", BuildDate:"2017-08-31T08:56:23Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Hey @tonglil
Error events can appear for any/all ingresses regardless of the ingress that caused it. I'm guessing a service without type NodePort was referenced in one of your ingress manifests.
@nicksardo the strange thing was that the manifests didn't change (for the 2 ingress in the cluster).
It's likely it was a temporary issue. I can reopen if I encounter it again.
Thanks for following up!
It was working for me two hours ago. I changed nothing and now I see. Hope it is temporary.
googleapi: Error 400: Invalid value for field 'namedPorts[0].port': '0'. Must be greater than or equal to 1, invalid
same here
@dfang please open a new issue in https://github.com/kubernetes/ingress-gce
This comes up all the time. It always happens when one of your ingress objects references a service which doesn't have type NodePort. https://github.com/kubernetes/ingress-gce/issues/75
got the error. Service had to be NodePort
I ran into this issue today, and the solution was to delete and re-install the NGINX ingress controller. I can route to ClusterIP services again!
I suppose this is indicative of something sinister though.
This is using stable/nginx-ingress-0.28.2 from https://github.com/helm/charts
Most helpful comment
This comes up all the time. It always happens when one of your ingress objects references a service which doesn't have type NodePort. https://github.com/kubernetes/ingress-gce/issues/75