GithubHelp home page GithubHelp logo

Comments (16)

bfmiv avatar bfmiv commented on July 18, 2024 12

This is supported in k8s 1.16.0+ via the service.beta.kubernetes.io/aws-load-balancer-eip-allocations annotation:

---
apiVersion: v1
kind: Service
metadata:
  annotations:
    # ...
    service.beta.kubernetes.io/aws-load-balancer-eip-allocations: >-
      eipalloc-0123456789abcdefg,
      eipalloc-0123456789hijklmn,
      eipalloc-0123456789opqrstu
    service.beta.kubernetes.io/aws-load-balancer-type: nlb
  name: test-service
spec:
  selector:
    app: test-service
  externalTrafficPolicy: Local
  ports:
    # ...
  type: LoadBalancer

from cloud-provider-aws.

sergey-safarov avatar sergey-safarov commented on July 18, 2024 4

Hi Nicholas @nckturner
Now I not able to verify this feature.
I will do it when start work with EKS again. So for now I close issue.

Thank you very much Nicholas

from cloud-provider-aws.

JnMik avatar JnMik commented on July 18, 2024 1

I would need this too.
To make sure my load balancer is always using the same ip, even if I destroy / respawn it. so I don't have to always edit a CNAME to point to another generated lb aws dns name

from cloud-provider-aws.

plumdog avatar plumdog commented on July 18, 2024

It seems that support for this did find its way into the in-tree cloud provider, but is missing from this out-of-tree provider. The original PR is here kubernetes/kubernetes#69263

@brooksgarrett it was your work originally got this support into the cloud provider, but it would seem to have got lost in the move to the separate repo. By the looks of things, the original work never made it into a non-alpha/beta release of Kubernetes. So, in a sense this is a feature, in another sense it is a nearly a regression.

I'm happy to open a PR that is shamelessly the original PR to the main kubernetes repo, but rejigged as best I can, or it might be simpler (and more honest) if @brooksgarrett were to do that, if they happen to have the time.

from cloud-provider-aws.

brooksgarrett avatar brooksgarrett commented on July 18, 2024

It was nearly a year from opening the PR to merge so I'm completely out of touch with the code base. I'll look when I have a moment and see if I can get it sorted.

from cloud-provider-aws.

plumdog avatar plumdog commented on July 18, 2024

Looking some more, might LoadBalancerIP be a better place to specify this, see https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer

from cloud-provider-aws.

izakp avatar izakp commented on July 18, 2024

Looking for this feature as well to host our top-level domian proxy app on Kubernetes rather than a standalone server

from cloud-provider-aws.

fejta-bot avatar fejta-bot commented on July 18, 2024

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

from cloud-provider-aws.

sergey-safarov avatar sergey-safarov commented on July 18, 2024

/remove-lifecycle stale

from cloud-provider-aws.

zimmertr avatar zimmertr commented on July 18, 2024

I'm confused, so you can specify an Elastic IP to associate with the service but not an existing Load Balancer's ARN? How does this solve the problem of reusing an existing Load Balancer?

from cloud-provider-aws.

jmturwy avatar jmturwy commented on July 18, 2024

I'm confused, so you can specify an Elastic IP to associate with the service but not an existing Load Balancer's ARN? How does this solve the problem of reusing an existing Load Balancer?

In AWS once a NLB is created you cannot change the subnets or assign an EIP. This is an aws limitation not k8

from cloud-provider-aws.

sskmail14 avatar sskmail14 commented on July 18, 2024

This is supported in k8s 1.16.0+ via the service.beta.kubernetes.io/aws-load-balancer-eip-allocations annotation:

---
apiVersion: v1
kind: Service
metadata:
  annotations:
    # ...
    service.beta.kubernetes.io/aws-load-balancer-eip-allocations: >-
      eipalloc-0123456789abcdefg,
      eipalloc-0123456789hijklmn,
      eipalloc-0123456789opqrstu
    service.beta.kubernetes.io/aws-load-balancer-type: nlb
  name: test-service
spec:
  selector:
    app: test-service
  externalTrafficPolicy: Local
  ports:
    # ...
  type: LoadBalancer

@bfmiv
Sounds good.

What is the External IP assigned for the service?
If so how did you point in R53 just as a IPv4 address?

from cloud-provider-aws.

sergey-safarov avatar sergey-safarov commented on July 18, 2024

What is the External IP assigned for the service?

Will be used IP associated with this allocations

      eipalloc-0123456789abcdefg,
      eipalloc-0123456789hijklmn,
      eipalloc-0123456789opqrstu

If so how did you point in R53 just as a IPv4 address?

You can resolve IP address using AWS API from IP allocation.

from cloud-provider-aws.

randomvariable avatar randomvariable commented on July 18, 2024

comment from @andrewsykim : kube-proxy will inject rules to take traffic for anything with "LoadBalancerIP" and will be routed internally.
Question as to whether this is intended behaviour, because of things like TLS termination or routing.

from cloud-provider-aws.

nckturner avatar nckturner commented on July 18, 2024

/assign

from cloud-provider-aws.

nckturner avatar nckturner commented on July 18, 2024

@sergey-safarov does the annotation mentioned above fit your use case? Should we close this issue?

from cloud-provider-aws.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.