Sitelet https://github.com/kubernetes/kops/pull/18632
Skip to content

aws: add option for IP-based node names - #18632

Merged
kubernetes-prow[bot] merged 1 commit into
kubernetes:masterfrom
hakman:aws-ip-based-node-names
Jul 27, 2026
Merged

kubernetes-prow[bot] merged 1 commit into
kubernetes:masterfrom
hakman:aws-ip-based-node-names

Conversation

@hakman

@hakman hakman commented Jul 27, 2026

Copy link
Copy Markdown
Member

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

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.
@kubernetes-prow
kubernetes-prow Bot requested a review from ameukam July 27, 2026 13:30
@kubernetes-prow

Copy link
Copy Markdown
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@kubernetes-prow kubernetes-prow Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 27, 2026
@kubernetes-prow
kubernetes-prow Bot requested a review from rifelpet July 27, 2026 13:30
@kubernetes-prow kubernetes-prow Bot added area/api area/documentation area/nodeup size/L Denotes a PR that changes 100-499 lines, ignoring generated files. area/provider/aws Issues or PRs related to aws provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 27, 2026
@hakman

hakman commented Jul 27, 2026

Copy link
Copy Markdown
Member Author

/test pull-kops-e2e-aws-ip-based-node-names

@hakman
hakman marked this pull request as ready for review July 27, 2026 15:58
@kubernetes-prow kubernetes-prow Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 27, 2026
@ameukam

ameukam commented Jul 27, 2026

Copy link
Copy Markdown
Member

/lgtm

@kubernetes-prow kubernetes-prow Bot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 27, 2026
@rifelpet

Copy link
Copy Markdown
Member

/approve

@kubernetes-prow

Copy link
Copy Markdown
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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubernetes-prow kubernetes-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 27, 2026
@kubernetes-prow
kubernetes-prow Bot merged commit 07bddb7 into kubernetes:master Jul 27, 2026
29 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/api area/documentation area/nodeup area/provider/aws Issues or PRs related to aws provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow using IP-based naming with custom domain and CCM

3 participants