Giter VIP home page Giter VIP logo

Comments (3)

danfromtitan avatar danfromtitan commented on August 18, 2024 2

@sergey-kalin, I was looking at a proper way to solve this, because like I said earlier it doesn't feel the right solution making calls into AWS control plane from a webhook.

There is a way to add additional node labels from the worker bootstrap script (i.e. /etc/eks/bootstrap.sh). The way you go about this is to use kubelet-extra-args with the bootstrap script.

So you're going to have a little script that would make a curl request into AWS metadata plane to find the zone ID mapping, then create new labels with kubelet-extra-args in the same script. You wrap it all together by running the script from a terraform launch template at EKS cluster creation time:

{
  filename     = "custom-labels.sh"
  content_type = "text/cloud-boothook"
  vars         =  {}
}

from envars-from-node-labels.

sergey-kalin avatar sergey-kalin commented on August 18, 2024 1

@danfromtitan I'm using Java version of aws ec2 describe-availability-zones actually, just getting all zones visible to container and filtering one needed.

There is same method for Go SDK - https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/#EC2.DescribeAvailabilityZones

Please mind it requires ec2:DescribeAvailabilityZones permission granted through e.g. service account

from envars-from-node-labels.

danfromtitan avatar danfromtitan commented on August 18, 2024

This is a use case on the very edge of the implementation design, mainly because zone IDs are specific to a subscription account, not so much to an EKS node. I understand the usefulness of it though, so I'll add a zone ID label next to the zone name.

What is the API call you're making now to determine the zone ID @sergey-kalin ?

from envars-from-node-labels.

Related Issues (8)

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.