Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nginx] Can't use named ports with ingress.kubernetes.io/service-upstream: "true" #1459

Closed
jordanjennings opened this issue Oct 2, 2017 · 2 comments · Fixed by #1607
Closed

Comments

@jordanjennings
Copy link

I am using the new annotation ingress.kubernetes.io/service-upstream: "true" and see that when I try to combine that with a named port in an ingress rule the ingress controller errors out with a message in the logs like:

Error: exit status 1
2017/10/02 19:50:03 [emerg] 58#58: invalid port in upstream "100.65.172.8:ui" in /tmp/nginx-cfg049697949:223
nginx: [emerg] invalid port in upstream "100.65.172.8:ui" in /tmp/nginx-cfg049697949:223
nginx: configuration file /tmp/nginx-cfg049697949 test failed

I'm using an ingress rule like this:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: redis-ui
  annotations:
    ingress.kubernetes.io/force-ssl-redirect: "true"
    ingress.kubernetes.io/service-upstream: "true"
spec:
  rules:
  - host: my.domain.com
    http:
      paths:
      - path: /
        backend:
          serviceName: myapp
          servicePort: ui

This is with gcr.io/google_containers/nginx-ingress-controller:0.9.0-beta.13 and Kubernetes 1.7.3.

@jordanjennings jordanjennings changed the title Can't use named ports with ingress.kubernetes.io/service-upstream: "true" Can't use named ports with ingress.kubernetes.io/service-upstream: "true" Oct 2, 2017
@jordanjennings jordanjennings changed the title Can't use named ports with ingress.kubernetes.io/service-upstream: "true" [nginx] Can't use named ports with ingress.kubernetes.io/service-upstream: "true" Oct 2, 2017
@aledbf
Copy link
Member

aledbf commented Oct 2, 2017

ping @chrismoos

@chrismoos
Copy link
Contributor

@jordanjennings I'll check this out, you might want to use the numerical port number in the ingress resource for now until it gets fixed.

chrismoos added a commit to chrismoos/ingress that referenced this issue Oct 26, 2017
aledbf added a commit that referenced this issue Oct 26, 2017
Add support for named ports with service-upstream. #1459
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants