kubernetes / cloud-provider-aws

Cloud provider for AWS
https://cloud-provider-aws.sigs.k8s.io/
Apache License 2.0
376 stars 300 forks source link

NLB does not map to manual EndpointSlice #859

Open Ghilteras opened 4 months ago

Ghilteras commented 4 months ago

I have a Service without a selector which creates a public NLB. Then I have an EndpointSlice that maps to a FQDN like this:

apiVersion: discovery.k8s.io/v1
kind: EndpointSlice
metadata:
  name: my-service
  namespace: default
  labels:
    kubernetes.io/service-name: my-service
addressType: FQDN
ports:
  - name: tcp
    protocol: TCP
    port: 8080
endpoints:
  - addresses:
      - "myfoo-service.com"
---
apiVersion: v1
kind: Service
metadata:
  name: my-service
  namespace: default
  annotations:
    service.beta.kubernetes.io/aws-load-balancer-type: "nlb"
    service.beta.kubernetes.io/aws-load-balancer-internal: "false"
spec:
  type: LoadBalancer
  ports:
    - name: tcp
      port: 8080
      targetPort: 8080
      protocol: TCP

What happened: I cannot reach the FQDN using the Public Load Balancer DNS name

What you expected to happen: I should be able to reach the FQDN using the Load Balancer DNS name

How to reproduce it (as minimally and precisely as possible): I apply the manifest above and I connect to the public DNS of the load balancer.

Anything else we need to know?: I can reach out the external service if I use a Service type ExternalName but I cannot map this Service to a LB Service b/c Services can only map to pod labels or custom Endpoints and the EndpointSlice does not work for some reason

Environment:

/kind bug

k8s-ci-robot commented 4 months ago

This issue is currently awaiting triage.

If cloud-provider-aws contributors determine this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
kmala commented 4 months ago

When you create a service of type load balancer, the routing for the LB is done using the instance IP's and node ports and thereby rely on the kube proxy iptable rules. And kube proxy doesn't support addresses of type fqdn.

k8s-triage-robot commented 1 month ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 3 days ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten