aws: add option for IP-based node names - #18632
Merged
kubernetes-prow[bot] merged 1 commit intoJul 27, 2026
Merged
Conversation
Add spec.cloudProvider.aws.useIPBasedNodeNames (v1alpha2: spec.cloudConfig.useIPBasedNodeNames) to name Kubernetes nodes after the EC2 private DNS name instead of the EC2 instance ID, restoring the naming used before kOps 1.24. When enabled, managed subnets launch instances with IP-based EC2 hostnames. The node name is derived from the primary private IPv4 address using the fixed format of EC2 IP-based hostnames; nodeup builds it from instance metadata and kops-controller derives it with the same formula when issuing certificates, so the two always agree without any extra IAM permissions or bootstrap protocol changes. IMDS local-hostname is not usable for this, as it follows the DHCP options domain rather than the EC2-generated name. nodeup fails fast on instances launched with resource-based hostnames. IP-based node names are not supported on IPv6-only clusters.
Contributor
|
Skipping CI for Draft Pull Request. |
Member
Author
|
/test pull-kops-e2e-aws-ip-based-node-names |
hakman
marked this pull request as ready for review
July 27, 2026 15:58
Member
|
/lgtm |
Member
|
/approve |
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rifelpet The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
kubernetes-prow
Bot
merged commit Jul 27, 2026
07bddb7
into
kubernetes:master
29 of 30 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add spec.cloudProvider.aws.useIPBasedNodeNames (v1alpha2: spec.cloudConfig.useIPBasedNodeNames) to name Kubernetes nodes after the EC2 private DNS name instead of the EC2 instance ID, restoring the naming used before kOps 1.24.
When enabled, managed subnets launch instances with IP-based EC2 hostnames. The node name is derived from the primary private IPv4 address using the fixed format of EC2 IP-based hostnames; nodeup builds it from instance metadata and kops-controller derives it with the same formula when issuing certificates, so the two always agree without any extra IAM permissions or bootstrap protocol changes. IMDS local-hostname is not usable for this, as it follows the DHCP options domain rather than the EC2-generated name. nodeup fails fast on instances launched with resource-based hostnames.
IP-based node names are not supported on IPv6-only clusters.
Fixes: #14035
/cc @rifelpet @ameukam