-
Notifications
You must be signed in to change notification settings - Fork 984
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
"failed to discover any AMIs" and "no subnets found" error when using bottlerocket@latest alias #7457
Comments
Getting the same issue using an alias (eg. a valid version number) other than “latest” also. The only way it works is to not use alias: and use name: |
@sammoseley Can you share the whole EC2NodeClass that you are using here? |
Can you also share the full log output from an installation of Karpenter that is showing these errors? I just tried the following EC2NodeClass and I was successfully able to discover the AMIs and successfully launch nodes that joined my cluster apiVersion: karpenter.k8s.aws/v1
kind: EC2NodeClass
metadata:
name: default
spec:
role: KarpenterNodeRole-scale-test
amiSelectorTerms:
- alias: bottlerocket@latest
subnetSelectorTerms:
- tags:
karpenter.sh/discovery: scale-test
securityGroupSelectorTerms:
- tags:
karpenter.sh/discovery: scale-test |
Thanks - ec2nodeclass being used:
Karpenter logs, following karpenter pod restart after updating ec2nodeclass to recreate the issue. Error is on the very bottom line:
|
This issue has been inactive for 14 days. StaleBot will close this stale issue after 14 more days of inactivity. |
Description
Observed Behavior:
When specifying the following ami selector:
We get this error repeatedly:
{"level":"ERROR","time":"2024-11-27T16:39:59.085Z","logger":"controller","caller":"disruption/helpers.go:149","message":"failed listing instance types for spot-default","commit":"901a5dc","controller":"disruption","namespace":"","name":"","reconcileID":"b498b292-ab97-45c8-a27f-8653f5614768","error":"no subnets found"}
and (less frequently for some reason, but seems more accurate):
{"level":"ERROR","time":"2024-11-27T12:35:40.807Z","logger":"controller","message":"Reconciler error","commit":"a2875e3","controller":"nodeclass.status","controllerGroup":"karpenter.k8s.aws","controllerKind":"EC2NodeClass","EC2NodeClass":{"name":"bottlerocket-default"},"namespace":"","name":"bottlerocket-default","reconcileID":"65cf9ace-195e-4bd8-906d-74df0ac6f749","error":"getting amis, getting AMI queries, failed to discover any AMIs for alias \"bottlerocket@latest\""}
If the alias is swapped for name, pinning a specific AMI version, eg:
It works fine, and Karpenter scales as expected.
The subnets are labelled as required, and this hasn't changed, so I think the "subnet" error is a bit misleading.
Expected Behavior:
Specifying alias: bottlerocket@latest should successfully select an AMI, as we're observing in Karpenter v0.37 elsewhere.
Reproduction Steps (Please include YAML):
Use this in the ec2nodeclass def:
Versions:
kubectl version
): 1.31Also seeing the same issue in v1.0.7, but that appears to throw the "no subnets found" error rather than the AMI discovery error.
The text was updated successfully, but these errors were encountered: