Giter Club home page Giter Club logo

Comments (12)

k8s-ci-robot avatar k8s-ci-robot commented on August 15, 2024

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. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

from cloud-provider-aws.

cartermckinnon avatar cartermckinnon commented on August 15, 2024

There’s a few quirks when using a custom domain name in your DHCP options, because it will only be reflected in the instance’s PrivateDnsName (the filter being used to map a Node to an EC2 instance) if one of these DNS attributes of your VPC is disabled: https://docs.aws.amazon.com/vpc/latest/userguide/vpc-dns.html#vpc-dns-support

The PrivateDnsName in the EC2 API is not always the same as the hostname from the OS (which is what kubelet will use as its node name by default).

In general, I would recommend just passing the provider ID to kubelet yourself, instead of relying on the node name -> EC2 instance lookup, as the former is much more efficient.

from cloud-provider-aws.

cartermckinnon avatar cartermckinnon commented on August 15, 2024

/kind support

from cloud-provider-aws.

cl-rf avatar cl-rf commented on August 15, 2024

I understand that manually specifying it would work but there is code to try to determine it would having to manually set it. The code assumes that if the hostname starts with "i-", it assumes it is the instance id. It seems like just stripping off the rest of the nodename would solve most issues, when using the the resource name in the subnet settings. Is there a reason that something like the following wouldn't work?

+++ b/pkg/providers/v1/aws.go
@@ -5124,6 +5124,7 @@ func nodeNameToIPAddress(nodeName string) string {
func (c *Cloud) nodeNameToInstanceID(nodeName types.NodeName) (InstanceID, error) {
  if strings.HasPrefix(string(nodeName), rbnNamePrefix) {
+   nodeName = strings.Split(nodeName, ".")[0]
     return InstanceID(nodeName), nil
}

from cloud-provider-aws.

cartermckinnon avatar cartermckinnon commented on August 15, 2024

Hm refreshing my memory -- previously we expected just the instance ID when resource-based naming was used, but @tzneal fixed that in: dce57f7

Shouldn't that cover this scenario? That commit is in 1.27+ currently, feel free to cherry-pick it to 1.26 if that would fix this for you

from cloud-provider-aws.

cl-rf avatar cl-rf commented on August 15, 2024

Actually, yeah, I was looking in 1.27.1 and it looks like that was changed between 1.27.1 and 1.272.

from cloud-provider-aws.

cl-rf avatar cl-rf commented on August 15, 2024

In the compatibility matrix, I am using 1.26 and it lists 1.26.1 as the version I should be using. For 1.27, it lists 1.27.1. The latest version of cloud-provider-aws for 1.26.9 and does not have that change. If I use 1.27.2, would it still be compatible with kubernetes 1.26? It does not look like it based on the support matrix and does not look like 1.27.2 should be used.

from cloud-provider-aws.

cartermckinnon avatar cartermckinnon commented on August 15, 2024

The matrix is just out of date, sorry about that. You should always use the latest CCM release for a given k8s minor version, I'll get the README updated.

from cloud-provider-aws.

cl-rf avatar cl-rf commented on August 15, 2024

Ok, I tested kubernetes 2.6.11 and it does work using 1.27.2 when I create a new cluster. It doesn't match the version though. Is the fix going to be backported to the 1.26.x branch of cloud-provider-aws?

from cloud-provider-aws.

cartermckinnon avatar cartermckinnon commented on August 15, 2024

I think it makes sense to cherry-pick this, we haven't heard of it causing any breakage. Feel free to open a PR 👍

from cloud-provider-aws.

cartermckinnon avatar cartermckinnon commented on August 15, 2024

/close

from cloud-provider-aws.

k8s-ci-robot avatar k8s-ci-robot commented on August 15, 2024

@cartermckinnon: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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.