Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

having difficulties using servicePort that isn't 80 #16

Closed
remster opened this issue Aug 4, 2017 · 6 comments
Closed

having difficulties using servicePort that isn't 80 #16

remster opened this issue Aug 4, 2017 · 6 comments

Comments

@remster
Copy link

remster commented Aug 4, 2017

is there a known problem/limitation with it?

@cainelli
Copy link
Contributor

cainelli commented Aug 4, 2017

Hey @remster, can you send the service and ingress yml you're using?

The logs from kong-ingress controller would also be useful.

@sandromello
Copy link
Member

Hi remster,

Indeed there is, I will make a quick test here just to be sure.

@remster
Copy link
Author

remster commented Aug 4, 2017

apiVersion: apps/v1beta1 # for versions before 1.6.0 use extensions/v1beta1
kind: Deployment
metadata:
  name: sample-service
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: sample-service
    spec:
      containers:
      - name: sample-service
        image: sample-service:0.0
        env:
          - name: PORT
            value: "3000"
---
kind: Service
apiVersion: v1
metadata:
  name: sample-service
spec:
  ports:
    - protocol: TCP
      port: 3000
      targetPort: 3000
  selector:
    app: sample-service
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: sample-service-ingress
  annotations:
    kolihub.io/acme.local: primary
spec:
  rules:
  - host: remek.ele
    http:
      paths:
      - path: /ele
        backend:
          serviceName: sample-service
          servicePort: 3000

sorry - dunno how to harvest logs from the kong-ingress controller

@sandromello
Copy link
Member

I've released a new version allowing custom ports, I tested with kubernetes v1.7.0.
Please let me known if this version solves this issue: quay.io/koli/kong-ingress:v0.2.1-alpha

The ingress is integrated with Kubernetes, if there's any error processing ingress resources you could check the reason viewing the events from the target namespace. E.g.:

kubectl get events -n default
LASTSEEN   FIRSTSEEN   COUNT     NAME                     KIND         SUBOBJECT                TYPE      REASON                    SOURCE                  MESSAGE
7m         9m          9         acme-routes              Ingress                               Warning   ServiceNotFound           kong-controller         Service 'web' not found for ingress

If you need a more verbose output you could check the logs of the kong-ingress-controller:

kubectl logs <kong-ingress-pod> -n kong-system

@sandromello
Copy link
Member

If you have problems please reopen this issue.

@remster
Copy link
Author

remster commented Aug 8, 2017

Thanks @sandromello - i confirm this is now fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants