Closed yuriydzobak closed 2 years ago
Did you change your provisioner at all? It looks like your log lines show that you have karpenter.k8s.aws/instance-family In [c4 m4 m5 m5a m6a and 3 others]
for your instance-family requirements, but I don't see that in your provisioner.
Additionally in your AWSNodeTemplate, it looks like you're using a custom AMI but not also specifying your UserData. Without this, Karpenter does not know how to bootstrap your node. More info here
Did you change your provisioner at all? It looks like your log lines show that you have
karpenter.k8s.aws/instance-family In [c4 m4 m5 m5a m6a and 3 others]
for your instance-family requirements, but I don't see that in your provisioner.Hi, oh, i confused you because ii tried, to use family, genaration and issue is the same the first logs from different provision configuration
Additionally in your AWSNodeTemplate, it looks like you're using a custom AMI but not also specifying your UserData. Without this, Karpenter does not know how to bootstrap your node. More info here
I know, thanks
I was able to provision a node on v0.16.3 with both PodSpec with NodeSelector:
apiVersion: apps/v1
kind: Deployment
metadata:
name: inflate
spec:
replicas: 0
selector:
matchLabels:
app: inflate
template:
metadata:
labels:
app: inflate
spec:
terminationGracePeriodSeconds: 0
containers:
- name: inflate
image: public.ecr.aws/eks-distro/kubernetes/pause:3.2
resources:
requests:
cpu: 1
nodeSelector:
karpenter.k8s.aws/instance-generation: "5"
karpenter.sh/capacity-type: spot
and ProvisionerRequirements:
requirements:
- key: karpenter.k8s.aws/instance-generation
operator: In
values:
- "4"
- "5"
- "6"
- key: karpenter.sh/capacity-type
operator: In
values:
- spot
- key: kubernetes.io/arch
operator: In
values:
- amd64
I reproduce the issue only for KIAM(kube2iam) When I'm using host network with IAM role on the instance, then karpenter can find spot gen 4-6
Do you have more steps on how you ran into this? Are you using v0.16.3? Are your provisioning requirements the same as the ones I ran above? If so, I'm interested how Karpenter's provisioning logic might have changed for you.
Do you have more steps on how you ran into this? Are you using v0.16.3? Are your provisioning requirements the same as the ones I ran above? If so, I'm interested how Karpenter's provisioning logic might have changed for you.
The steps are the same like in https://karpenter.sh/v0.16.3/getting-started/migrating-from-cas/
, only different that I don't use IRSA, I'm using KIAM
Yes, I'm using 0.16.3, I saw a new version was published but didn't check yet
I've checked on another AWS account and i can't reproduce the issue. I'm still finding out what's wrong with my AWS account
Hi, I tested version 0.17.0 and 0.18.0 but the issue is still existing I think this one broke karpenter #2283
if I run command in AWS account where karpenter can't find gen 4-6. NOTE: It works if product-description
is Linux/UNIX (Amazon VPC)
aws ec2 describe-spot-price-history --availability-zone us-east-1b --filters Name=instance-type,Values=m5a.large Name=product-description,Values=Linux/UNIX --region us-east-1
{
"SpotPriceHistory": []
}
for example, if i run in account where karpenter is working right
ws ec2 describe-spot-price-history --availability-zone us-east-1b --filters Name=instance-type,Values=m5a.large Name=product-description,Values=Linux/UNIX --region us-east-1
{
"SpotPriceHistory": [
{
"AvailabilityZone": "us-east-1b",
"InstanceType": "m5a.large",
"ProductDescription": "Linux/UNIX",
"SpotPrice": "0.046600",
"Timestamp": "2022-10-15T23:59:06.000Z"
},
{
"AvailabilityZone": "us-east-1b",
"InstanceType": "m5a.large",
"ProductDescription": "Linux/UNIX",
"SpotPrice": "0.046500",
"Timestamp": "2022-10-15T18:45:02.000Z"
},
..........
When I’ve enabled
controller:
env:
- name: AWS_ISOLATED_VPC
value: "true"
it's working now 😎, but why karpenter doesn’t show any error? and why it worked 0.16.0 without it The VPC has NAT. https://karpenter.sh/v0.18.0/troubleshooting/#stale-pricing-data-on-isolated-subnet
Using AWS_ISOLATED_VPC
causes Karpenter to use it's static fixed price list, it will never try to pull spot or on-demand prices so that's why it's working for you.
From what I can tell, if your account still supports EC2 Classic, then the instance type descriptions are Linux/UNIX (Amazon VPC)
for the non-EC2 classic types to differentiate them from the EC2 classic ones.
If your account does not support EC2 classic, then the instance type descriptions are Linux/UNIX
always.
The code currently only filters for spot prices with a description of Linux/UNIX
, which for accounts that support EC2 classic are the classic instance types only. There may not be any of those types available via spot as it's being retired.
We'll need to make a change to identify the non-classic types in classic supporting accounts as the query is different.
Version
Karpenter Version: v0.16.1
Kubernetes Version: v1.23.9 region: us-east-1
Expected Behavior
Create spot instances generation 4-6
Actual Behavior
When I’m using spot instance karpenter found only gen 3, when I hardcoded to use another gen, it shows an error like
Steps to Reproduce the Problem
deployment
Resource Specs and Logs
when I'm using version 0.16.0 all is ok
when version 0.16.1 - 0.16.3
any other issues aren't shown up
Community Note