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

Karpenter creates Node objects with the wrong name #927

Closed
olemarkus opened this issue Dec 6, 2021 · 4 comments · Fixed by #1006
Closed

Karpenter creates Node objects with the wrong name #927

olemarkus opened this issue Dec 6, 2021 · 4 comments · Fixed by #1006
Labels
bug Something isn't working burning Time sensitive issues kubernetes Kubernetes API related kubernetes-1.23 Issues related to Kubernetes 1.23 compat

Comments

@olemarkus
Copy link
Contributor

Version

Karpenter: v0.51.1

Kubernetes: v1.23.0-rc.1

Expected Behavior

Karpenter creates node objects with the correct node name (e.g i-0df38da50804be2c0 )

Actual Behavior

Karpeneter always create objects using the private DNS name of instances (e.g ip-172-20-122-63.eu-central-1.compute.internal)

Steps to Reproduce the Problem

  • Launch a cluster using external AWS Cloud Controller Manager master branch
  • Ensure Resource Based Names is used
  • Do not set --hostname-override on the kubelet, letting it default to os.hostname

Karpenter will then assume the node name is ip-x-x-x-x..compute.internal, but the actual node name will be i-xxxxxxx

Note that the node names should not be FQDN, only the hostname.
This change was implemented in cloud-provider-AWS to support things like IPv6-native subnets and will be a part of CCM 1.23.

I am not sure how Karpenter should know the correct Node name up front. The easiest implementation would probably be a CLI flag on the controller.

@olemarkus olemarkus added the bug Something isn't working label Dec 6, 2021
@ellistarn
Copy link
Contributor

This is a great callout -- it looks like Karpenter doesn't work on 1.23. I love that the new node names are simply the node id. This allows us to remove an additional describe instance call that's irked me.

It should be straight forward to implement a check on the kubernetes version and implement the different behavior. Are you interested in taking this on?

@olemarkus
Copy link
Contributor Author

I can if we can require external CCM to be used for 1.23 clusters. If not, we don't know the convention based on version alone. The in-tree CCM will not get this feature.

@akestner akestner added kubernetes Kubernetes API related kubernetes-1.23 Issues related to Kubernetes 1.23 compat labels Dec 6, 2021
@ellistarn
Copy link
Contributor

This gets very tricky. There are many ways to deploy Karpenter. I'm willing to be a bit opinionated w/ the aws cloud provider if we can at least cover major providers (eks, kops, etc). Given that the out-of-tree aws provider is the future, we will need to be fully on it at some point, the question is when.

@olemarkus
Copy link
Contributor Author

For IPv6-based clusters, external CCM is required. And kOps will only support external CCM as of 1.24 for AWS.
I suspect adoption will be quite high already from kOps 1.23.

But yes, the trickiness of this is why I suggested having a CLI flag or similar for determining the naming convention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working burning Time sensitive issues kubernetes Kubernetes API related kubernetes-1.23 Issues related to Kubernetes 1.23 compat
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants