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

Add support for overriding default hostname type #6097

Open
stevehipwell opened this issue Apr 25, 2024 · 5 comments · May be fixed by #7266
Open

Add support for overriding default hostname type #6097

stevehipwell opened this issue Apr 25, 2024 · 5 comments · May be fixed by #7266
Labels
feature New feature or request

Comments

@stevehipwell
Copy link
Contributor

Description

What problem are you trying to solve?
I'd like to be able to override the subnet default hostname type for EC2 instances created by Karpenter.

How important is this feature to you?
This is a nice to have based on consistency with nodes created from an autoscaling group & launch template pattern.

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@stevehipwell stevehipwell added feature New feature or request needs-triage Issues that need to be triaged labels Apr 25, 2024
@jonathan-innis
Copy link
Contributor

I'd like to be able to override the subnet default hostname type for EC2 instances created by Karpenter

@stevehipwell Is this a launch template configuration setting?

@jonathan-innis jonathan-innis removed the needs-triage Issues that need to be triaged label May 13, 2024
@stevehipwell
Copy link
Contributor Author

@jonathan-innis I think it is. However the general docs which says that you can use the resource name for hostname in all scenarios is contradicted in other documents. I think this is still useful if you need an IPv6 enabled subnet, but less compelling.

@skeggse
Copy link

skeggse commented Jun 21, 2024

I can confirm that it's a launch template configuration setting. I'm not sure what docs you're referring to @stevehipwell, but I just tried launching an EC2 instance in an IPv4-only VPC with the "resource name" hostname type and it definitely configured the hostname accordingly. I'd love to see this feature!

EDIT: my read of the launch template design doc suggests that we might not want a control knob for this. If that's the case, then I argue that we should always configure the launch template to use the "resource name" configuration setting, because the default configuration setting of "IP Name" is referred to as a legacy naming scheme in the docs. As an added bonus, it sounds like this would make kops and eks more consistent?

Happy to try my hand at a PR for this if I can get some guidance on making this behavior always true vs making it opt-in/configurable.

@sepich
Copy link

sepich commented Sep 20, 2024

Tried to use this with karpenter
https://awslabs.github.io/amazon-eks-ami/nodeadm/doc/examples/#using-instance-id-as-node-name-experimental
Unfortunately kubelet then cannot register in cluster:

Sep 20 09:36:25 ip-10-20-7-154.eu-north-1.compute.internal kubelet[2119]: E0920 09:36:25.288492    2119 kubelet_node_status.go:92] "Unable to register node with API server" err="nodes \"i-0018a651259c57f2d\" is forbidden: node \"ip-10-20-7-154.eu-north-1.compute.internal\" is not allowed to modify node \"i-0018a651259c57f2d\"" node="i-0018a651259c57f2d"

@sepich
Copy link

sepich commented Sep 20, 2024

Update: it does not work with "EKS API" auth in EKS. Only works with "ConfigMap" auth, exactly as written in docs. Node name in k8s and EC2 "Name" tag becomes "i-xxx". But actual hostname of OS still is "ip-x-x-x-x"

@skeggse skeggse linked a pull request Oct 22, 2024 that will close this issue
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants