Comments (8)
You probably have an ingress referencing a service that's not type NodePort. It may not be the newly added ingress, it could be any GCE ingress.
from ingress-gce.
I was able to solve it by adding an annotation to disable the Google LB for my ingress.
metadata:
name: test-deployment
annotations:
kubernetes.io/ingress.class: "nginx"
http://blog.chronos-technology.nl/post/disabling-gke-load-balancer-in-kubernetes/
from ingress-gce.
You where right, it wasn't even the ingress I just created, it was another one I lost track of.
Thanks for the help.
Better errors would be nice though 😬
from ingress-gce.
Yes. kubernetes.io/ingress.class: nginx can handle services that are exposed by ClusterIp. We have it working in production
from ingress-gce.
@ddehghan I definitely tried that in GKE with no luck, I'm having to use a dynamic IP on a node, which changes every k8s update. Are you sure you're using cluster ip and not node ip?
from ingress-gce.
Here is my settings. nginx-ingress-controller is deployed in the cluster and gets the traffic from the External Load balancer on GKE. We dont expose our pods to the GCE ingress. We just use it to bring the traffic to our own nginx-ingress. With the settings below the traffic gets routed correctly. But we still see this error
"googleapi: Error 400: Invalid value for field 'namedPorts[4].port': '0'. Must be greater than or equal to 1, invalid"
I am pretty sure this is just a bug. I deleted the ingress and recreated it and the error went away.
It actually happens consistently. I changed the service type form Nodeport to ClusterIP and back and the errors appears. And I deleted the ingress and recreated it and the error goes away.
---
Not shown is the nginx-ingress-controller deployed with helm.
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: https-ingress
annotations:
kubernetes.io/ingress.class: nginx
certmanager.k8s.io/cluster-issuer: letsencrypt-prod-cluster-issuer
spec:
tls:
- secretName: example-prod-tls
hosts:
- example.io
- '*.example.io'
rules:
- host: test2.example.io
http:
paths:
- path: /
backend:
serviceName: dm-django-stage
servicePort: dm-django-port
---
apiVersion: v1
kind: Service
metadata:
name: dm-django-stage
spec:
ports:
- name: dm-django-port
port: 5000
protocol: TCP
targetPort: 5000
selector:
app: dm-django
type: NodePort <-- or ClusterIP here. They both work.
from ingress-gce.
I know everyone is going to love this, but the way I was able to fix this was to delete and reinstall the NGINX Ingress controller itself. Now I'm using ClusterIP for my service and the ingress can assign addresses to it!
This is using stable/nginx-ingress-0.28.2
from https://github.com/helm/charts
from ingress-gce.
@Freyert are you on GKE? I suspect their firewalls make this impossible
from ingress-gce.
Related Issues (20)
- MultiClusterService CDN TTL configs ignored
- Annotations to headers in security
- [glbc] Only watch pods hostNetwork=false or having container ports specified HOT 4
- MultiClusterService: max-rate HOT 7
- Support for cloudcdn cache key based on Header in backendconfig HOT 4
- Slowness of throughput when URLs are switched between ingresses HOT 8
- Images should be published to community registry HOT 6
- 502 on access after deploying the app with ingress, with successful health testing HOT 3
- Is there any way to add dynamic headers to backendconfig customresponseheaders HOT 1
- Remove response header added by server HOT 3
- GCE ingress L4 Support HOT 8
- How to implement content-based health check for GKE ingress HOT 4
- Front-end mutual TLS support HOT 3
- Missing :te header using grpc on a http2 ingress HOT 2
- Cluster with virtual kubelet blocking NEG sync HOT 5
- Clarification on Best Practices for MCS with Single MCI and Intermittent 502 Errors HOT 1
- Published CRD HOT 1
- [release-1.29] Code Freeze for Ingress v1.29 release on branch:master HOT 1
- Add alternative distro images for defaultbackend
- Unexpected Automatic Creation of Network Endpoint Groups (NEG) on GKE HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ingress-gce.