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

ingress-nginx can not load service with out selector corrsectly #3334

Closed
wilelm123 opened this issue Nov 1, 2018 · 1 comment
Closed

ingress-nginx can not load service with out selector corrsectly #3334

wilelm123 opened this issue Nov 1, 2018 · 1 comment

Comments

@wilelm123
Copy link

wilelm123 commented Nov 1, 2018

Is this a BUG REPORT or FEATURE REQUEST? (choose one):

Maybe this is a bug

NGINX Ingress controller version:

quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.20.0

Kubernetes version (use kubectl version):

Client Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.2", GitCommit:"17c77c7898218073f14c8d573582e8d2313dc740", GitTreeState:"clean", BuildDate:"2018-10-24T06:54:59Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.1", GitCommit:"4ed3216f3ec431b140b1d899130a69fc671678f4", GitTreeState:"clean", BuildDate:"2018-10-05T16:36:14Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"}

Environment:

  • Cloud provider or hardware configuration: aws ec2 baremetal
  • OS (e.g. from /etc/os-release): ubuntu 16.04
  • Kernel (e.g. uname -a):
Linux kube-master 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  • Install tools: kubeadm
  • Others:

What happened:
I want to forward jenkins service with kubernetes cluster, so I followed the doc
and create a service with out a selector and a endpoint:

apiVersion: v1
kind: Endpoints
metadata:
  name: jenkins
subsets:
  - addresses:
    - ip: 172.31.13.39
    ports:
    - port: 8080

---

apiVersion: v1
kind: Service
metadata:
  name: jenkins-service
  namespace: default
spec:
  ports:
  - name: http
    protocol: TCP
    port: 80
    targetPort: 8080

and the ingress rule like this

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: nginx-ingress
  annotations:
    ingress.kubernetes.io/force-ssl-redirect: "true"
spec:
  rules:
  - host: mongo-express.teletraan.io
    http:
      paths:
      - path: /
        backend:
          serviceName: mongo-express
          servicePort: http
#  - host: kibana.teletraan.io
#    http:
#      paths:
#      - path: /
#        backend:
#          serviceName: kibana-logging
#          servicePort: ui
  - host: jenkins-cn.teletraan.io
    http:
      paths:
      - path: /
        backend:
          serviceName: jenkins-service
          servicePort: 8080

What you expected to happen:
I expect to access http://jenkins-cn.teletraan.io and will response jenkins login page,
but that not work, when I access http://jenkins-cn.teletraan.io (ingress pod deploy as daemonset, and I have bind address to one of the node ip), the server response with 503 http code
plus:
mongo-express.teletraan.io point to a normal service with selector, and it works normal

ingress log:

I1101 04:04:37.230650       7 backend_ssl.go:189] Updating local copy of SSL certificate "default/teletraan-tls-cert" with missing intermediate CA certs
W1101 04:04:37.230761       7 controller.go:749] Error obtaining Endpoints for Service "kube-system/jenkins": no object matching key "kube-system/jenkins" in local store
W1101 04:04:37.230826       7 endpoints.go:79] Error obtaining Endpoints for Service "default/jenkins-service": no object matching key "default/jenkins-service" in local store
W1101 04:04:37.230833       7 controller.go:824] Service "default/jenkins-service" does not have any active Endpoint.
I1101 04:04:37.230919       7 controller.go:177] Configuration changes detected, backend reload required.
I1101 04:04:37.334649       7 controller.go:195] Backend successfully reloaded.

any suggestion please?

@wilelm123 wilelm123 changed the title ingress-nginx can not load service with out selector ingress-nginx can not load service with out selector corrsectly Nov 1, 2018
@aledbf
Copy link
Member

aledbf commented Nov 1, 2018

Closing. You don't need and endpoint. Please check this example #629 (comment)

@aledbf aledbf closed this as completed Nov 1, 2018
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

No branches or pull requests

2 participants