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

Port name seems not supported with CombinedRoutes #3296

Closed
1 task done
seb-inf opened this issue Dec 21, 2022 · 4 comments · Fixed by #3313
Closed
1 task done

Port name seems not supported with CombinedRoutes #3296

seb-inf opened this issue Dec 21, 2022 · 4 comments · Fixed by #3313
Assignees
Labels
bug Something isn't working
Milestone

Comments

@seb-inf
Copy link

seb-inf commented Dec 21, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Service:

apiVersion: v1
kind: Service
metadata:
  name: demo-test
  namespace: demo-test
spec:
  clusterIP: 10.23.1.120
  clusterIPs:
  - 10.23.1.120
  internalTrafficPolicy: Cluster
  ipFamilies:
  - IPv4
  ipFamilyPolicy: SingleStack
  ports:
  - name: http
    port: 8080
    protocol: TCP
    targetPort: http

Ingress

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    konghq.com/regex-priority: "110"
    konghq.com/strip-path: "false"
    kubernetes.io/ingress.class: kong
  creationTimestamp: "2022-11-25T15:03:20Z"
  generation: 4
  name: demo-test-backend
  namespace: demo-test
  resourceVersion: "77594872"
  uid: 20d6eee3-6ef1-4796-b325-929068620b6f
spec:
  rules:
  - host: demo.test.company.com
    http:
      paths:
      - backend:
          service:
            name: demo-test
            port:
              name: http
        path: /~/(api|docs)
        pathType: ImplementationSpecific
status:
  loadBalancer:
    ingress:
    - ip: 10.23.14.50

Kong configuration:

router_flavor = traditional

Current behavior: 503

{"message": "failure to get a peer from the ring-balancer"}

In logs:

kong-kong-6d6b957cff-kp2j9 ingress-controller time="2022-12-21T10:48:52Z" level=error msg="resource processing failed: can't find port for backend kubernetes service: no suitable port found" GVK="networking.k8s.io/v1, Kind=Ingress" name=demo-test-backend namespace=demo-test                                                         │
kong-kong-6d6b957cff-kp2j9 ingress-controller time="2022-12-21T10:48:52Z" level=info msg="no targets found to create upstream" service_name=demo-test.demo-test-backend.demo-test.0                                                                                                                                         │
kong-kong-6d6b957cff-kp2j9 ingress-controller time="2022-12-21T10:49:01Z" level=error msg="resource processing failed: can't find port for backend kubernetes service: no suitable port found" GVK="networking.k8s.io/v1, Kind=Ingress" name=demo-test-backend namespace=demo-test                                                         │
kong-kong-6d6b957cff-kp2j9 ingress-controller time="2022-12-21T10:49:01Z" level=info msg="no targets found to create upstream" service_name=demo-test.demo-test-backend.demo-test.0

Expected Behavior

The requests should be routed to BE.

Steps To Reproduce

1. Create Ingress and Service as above
2. Deploy Kong 3.1 and KIC 2.8
3. Make request to ingress

Kong Ingress Controller version

2.8

Kubernetes version

v1.22.15-gke.100

Anything else?

No response

@seb-inf seb-inf added the bug Something isn't working label Dec 21, 2022
@riipeckx
Copy link

Reproduced this while deploying ArgoCD Operator. It uses named port by default which then creates events like below when applying :

Events:
  Type     Reason                              Age                 From         Message
  ----     ------                              ----                ----         -------
  Warning  KongConfigurationTranslationFailed  18m (x17 over 19m)  kong-client  can't find port for backend kubernetes service: no suitable port found

I downgrade to 2.7.0 for now.

@pmalek
Copy link
Member

pmalek commented Jan 4, 2023

@seb-inf @riipeckx You can also try disabling CombinedRoutes feature flag as indicated in this comment.

The fix for this has already been merged in #3313 and will be provided with next release we cut.

@riipeckx
Copy link

riipeckx commented Jan 4, 2023

Thanks for the answer @pmalek, I'll just wait for the next release then.

Thanks again.

@pmalek pmalek closed this as completed Jan 4, 2023
@seb-inf
Copy link
Author

seb-inf commented Jan 5, 2023

Thank you @pmalek @mflendrich

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
4 participants